提交 470770bf 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册