projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0746f3
)
Bluetooth: Fix test for lookup_dev return value
author
Johan Hedberg
<johan.hedberg@intel.com>
Thu, 12 Dec 2013 07:53:21 +0000
(09:53 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 12 Dec 2013 07:59:21 +0000
(23:59 -0800)
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>
net/bluetooth/6lowpan.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/6lowpan.c
b/net/bluetooth/6lowpan.c
index
3cbb1d1
..
5ad8b48
100644
(file)
--- a/
net/bluetooth/6lowpan.c
+++ b/
net/bluetooth/6lowpan.c
@@
-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);