浏览代码

ieee802154: hwsim: fix copy-paste error in hwsim_set_edge_lqi()

The return value from kzalloc() is not checked correctly. The
test is done against a wrong variable. This patch fix it.

Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun 7 年之前
父节点
当前提交
470770bf84
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ieee802154/mac802154_hwsim.c

+ 1 - 1
drivers/net/ieee802154/mac802154_hwsim.c

@@ -571,7 +571,7 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
 	}
 
 	einfo = kzalloc(sizeof(*einfo), GFP_KERNEL);
-	if (!info) {
+	if (!einfo) {
 		mutex_unlock(&hwsim_phys_lock);
 		return -ENOMEM;
 	}