Skip to content

Commit

Permalink
ieee802154: hwsim: fix copy-paste error in hwsim_set_edge_lqi()
Browse files Browse the repository at this point in the history
The return value from kzalloc() is not checked correctly. The
test is done against a wrong variable. This patch fix it.

Fixes: f25da51 ("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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Aug 9, 2018
1 parent 1c9f4a3 commit 470770b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ieee802154/mac802154_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 470770b

Please sign in to comment.