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

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
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment