projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c81d555
)
Bluetooth: hci_bcm: checking for ERR_PTR instead of NULL
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 22 Oct 2015 09:06:09 +0000
(12:06 +0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 22 Oct 2015 09:32:47 +0000
(11:32 +0200)
bt_skb_alloc() returns NULL on error, it never returns an ERR_PTR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_bcm.c
patch
|
blob
|
history
diff --git
a/drivers/bluetooth/hci_bcm.c
b/drivers/bluetooth/hci_bcm.c
index 1aa88dbd6fec990f9e9244f79b963e4c4bacd317..cb852cc750b78256cd05fb62eda18dfb28c246aa 100644
(file)
--- a/
drivers/bluetooth/hci_bcm.c
+++ b/
drivers/bluetooth/hci_bcm.c
@@
-259,8
+259,8
@@
static int bcm_set_diag(struct hci_dev *hdev, bool enable)
return -ENETDOWN;
skb = bt_skb_alloc(3, GFP_KERNEL);
- if (
IS_ERR(skb)
)
- return
PTR_ERR(skb)
;
+ if (
!skb
)
+ return
-ENOMEM
;
*skb_put(skb, 1) = BCM_LM_DIAG_PKT;
*skb_put(skb, 1) = 0xf0;