Bluetooth: clean up error pointer checking
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Jul 2022 11:23:49 +0000 (14:23 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 22 Jul 2022 00:11:10 +0000 (17:11 -0700)
The bt_skb_sendmsg() function can't return NULL so there is no need to
check for that.  Several of these checks were removed previously but
this one was missed.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/bluetooth.h

index 6b48d9e2aab9dc6e66f48003b9e62ab811ecfab9..a8b52175af051a414399556e54e2e827f0ca51e7 100644 (file)
@@ -494,7 +494,7 @@ static inline struct sk_buff *bt_skb_sendmmsg(struct sock *sk,
        struct sk_buff *skb, **frag;
 
        skb = bt_skb_sendmsg(sk, msg, len, mtu, headroom, tailroom);
-       if (IS_ERR_OR_NULL(skb))
+       if (IS_ERR(skb))
                return skb;
 
        len -= skb->len;