summaryrefslogtreecommitdiff
path: root/net/bluetooth/sco.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-09-16 23:10:48 +0300
committerMarcel Holtmann <marcel@holtmann.org>2021-09-21 11:44:52 +0300
commit266191aa8d14b84958aaeb5e96ee4e97839e3d87 (patch)
tree3cfbce208e8c3283c8d986839f1c5c2d6409acb6 /net/bluetooth/sco.c
parent09572fca7223bcf32c9f0d5e100d8381a81d55f4 (diff)
downloadlinux-266191aa8d14b84958aaeb5e96ee4e97839e3d87.tar.xz
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 'net/bluetooth/sco.c')
-rw-r--r--net/bluetooth/sco.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 446f871f11ed..f51399d1b9cb 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -733,7 +733,7 @@ static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
return -EOPNOTSUPP;
skb = bt_skb_sendmsg(sk, msg, len, len, 0, 0);
- if (IS_ERR_OR_NULL(skb))
+ if (IS_ERR(skb))
return PTR_ERR(skb);
lock_sock(sk);