diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-08-08 02:43:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-08 18:36:49 -0700 |
commit | 470770bf841b49fe129876300dfcb74a8bbabe99 (patch) | |
tree | 754bae41483258fa3fdf02af2229cb7bcf6c6761 /drivers/net/ieee802154 | |
parent | 1c9f4a3fce770f194647dd1441502dd5b84ca883 (diff) | |
download | linux-470770bf841b49fe129876300dfcb74a8bbabe99.tar.bz2 |
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>
Diffstat (limited to 'drivers/net/ieee802154')
-rw-r--r-- | drivers/net/ieee802154/mac802154_hwsim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c index 53f39435321e..9319780a52ca 100644 --- a/drivers/net/ieee802154/mac802154_hwsim.c +++ b/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; } |