aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-09-16 13:10:48 -0700
committerMarcel Holtmann <marcel@holtmann.org>2021-09-21 10:44:52 +0200
commit266191aa8d14b84958aaeb5e96ee4e97839e3d87 (patch)
tree3cfbce208e8c3283c8d986839f1c5c2d6409acb6 /include/net/bluetooth
parentBluetooth: hci_sock: Add support for BT_{SND,RCV}BUF (diff)
downloadlinux-dev-266191aa8d14b84958aaeb5e96ee4e97839e3d87.tar.xz
linux-dev-266191aa8d14b84958aaeb5e96ee4e97839e3d87.zip
Bluetooth: Fix passing NULL to PTR_ERR
Passing NULL to PTR_ERR will result in 0 (success), also since the likes of bt_skb_sendmsg does never return NULL it is safe to replace the instances of IS_ERR_OR_NULL with IS_ERR when checking its return. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Tedd Ho-Jeong An <tedd.an@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/bluetooth.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index aa221c1a27c6..3271870fd85e 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -496,7 +496,7 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk,
struct sk_buff *tmp;
tmp = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom);
- if (IS_ERR_OR_NULL(tmp)) {
+ if (IS_ERR(tmp)) {
kfree_skb(skb);
return tmp;
}