mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
Bluetooth: Fix test for lookup_dev return value
The condition wouldn't have previously caused -ENOENT to be returned if dev was NULL. The proper condition should be if (!dev || !dev->netdev). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
d0746f3ecc
commit
30d3db44bb
@ -330,7 +330,7 @@ int bt_6lowpan_recv(struct l2cap_conn *conn, struct sk_buff *skb)
|
||||
return -ENOENT;
|
||||
|
||||
dev = lookup_dev(conn);
|
||||
if (dev && !dev->netdev)
|
||||
if (!dev || !dev->netdev)
|
||||
return -ENOENT;
|
||||
|
||||
err = recv_pkt(skb, dev->netdev, conn);
|
||||
|
Loading…
Reference in New Issue
Block a user