[PATCH] Bluetooth: Replace IS_ERR_OR_NULL with IS_ERR

Aashish Sharma posted 1 patch 3 years, 8 months ago
include/net/bluetooth/bluetooth.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] Bluetooth: Replace IS_ERR_OR_NULL with IS_ERR
Posted by Aashish Sharma 3 years, 8 months ago
Since bt_skb_sendmsg never returns NULL, replace IS_ERR_OR_NULL
with IS_ERR.

Signed-off-by: Aashish Sharma <shraash@google.com>
---
 include/net/bluetooth/bluetooth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 6b48d9e2aab9..a8b52175af05 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -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;
-- 
2.37.1.455.g008518b4e5-goog
Re: [PATCH] Bluetooth: Replace IS_ERR_OR_NULL with IS_ERR
Posted by Guenter Roeck 3 years, 8 months ago
On Sun, Jul 31, 2022 at 9:29 PM Aashish Sharma <shraash@google.com> wrote:
>
> Since bt_skb_sendmsg never returns NULL, replace IS_ERR_OR_NULL
> with IS_ERR.
>
> Signed-off-by: Aashish Sharma <shraash@google.com>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>  include/net/bluetooth/bluetooth.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
> index 6b48d9e2aab9..a8b52175af05 100644
> --- a/include/net/bluetooth/bluetooth.h
> +++ b/include/net/bluetooth/bluetooth.h
> @@ -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;
> --
> 2.37.1.455.g008518b4e5-goog
>