> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of Philipp Hahn
> Sent: Tuesday, March 10, 2026 12:49 PM
> To: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; dm-
> [email protected]; [email protected];
> [email protected]; [email protected]; intel-wired-
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected]; linux-security-
> [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; sched-
> [email protected]; [email protected]; tipc-
> [email protected]; [email protected]; Philipp Hahn
> <[email protected]>
> Cc: Marcel Holtmann <[email protected]>; Johan Hedberg
> <[email protected]>; Luiz Augusto von Dentz
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH 25/61] net/bluetooth: Prefer
> IS_ERR_OR_NULL over manual NULL check
> 
> Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
> check.
> 
> Change generated with coccinelle.
> 
> To: Marcel Holtmann <[email protected]>
> To: Johan Hedberg <[email protected]>
> To: Luiz Augusto von Dentz <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Philipp Hahn <[email protected]>
> ---
>  net/bluetooth/mgmt.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index
> a7238fd3b03bb54f39af1afee74dc1acd931c324..06d2da67bbe14e17ee478aa939de
> 26526c333d91 100644
> --- a/net/bluetooth/mgmt.c
> +++ b/net/bluetooth/mgmt.c
> @@ -4169,7 +4169,7 @@ static void set_default_phy_complete(struct
> hci_dev *hdev, void *data, int err)
>               mgmt_phy_configuration_changed(hdev, cmd->sk);
>       }
> 
> -     if (skb && !IS_ERR(skb))
> +     if (!IS_ERR_OR_NULL(skb))
>               kfree_skb(skb);
> 
>       mgmt_pending_free(cmd);
> @@ -5730,7 +5730,7 @@ static void read_local_oob_data_complete(struct
> hci_dev *hdev, void *data,
>                         MGMT_STATUS_SUCCESS, &mgmt_rp, rp_size);
> 
>  remove:
> -     if (skb && !IS_ERR(skb))
> +     if (!IS_ERR_OR_NULL(skb))
>               kfree_skb(skb);
> 
>       mgmt_pending_free(cmd);
> @@ -8277,7 +8277,7 @@ static void
> read_local_oob_ext_data_complete(struct hci_dev *hdev, void *data,
>                                mgmt_rp, sizeof(*mgmt_rp) + eir_len,
>                                HCI_MGMT_OOB_DATA_EVENTS, cmd->sk);
>  done:
> -     if (skb && !IS_ERR(skb))
> +     if (!IS_ERR_OR_NULL(skb))
>               kfree_skb(skb);
> 
>       kfree(mgmt_rp);
> 
> --
> 2.43.0

Reviewed-by: Aleksandr Loktionov <[email protected]>

Reply via email to