Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 470770bf authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

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: f25da51f ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarStefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1c9f4a3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -571,7 +571,7 @@ static int hwsim_set_edge_lqi(struct sk_buff *msg, struct genl_info *info)
	}
	}


	einfo = kzalloc(sizeof(*einfo), GFP_KERNEL);
	einfo = kzalloc(sizeof(*einfo), GFP_KERNEL);
	if (!info) {
	if (!einfo) {
		mutex_unlock(&hwsim_phys_lock);
		mutex_unlock(&hwsim_phys_lock);
		return -ENOMEM;
		return -ENOMEM;
	}
	}