Re: [PATCH v5] staging: rtl8723bs: Prevent duplicate NULL tests on a value

From: Dan Carpenter
Date: Sat Apr 05 2025 - 11:00:15 EST


On Sat, Apr 05, 2025 at 02:21:42PM +0100, Abraham Samuel Adekunle wrote:
> When a value has been tested for NULL in an expression, a
> second NULL test on the same value in another expression
> is unnecessary when the value has not been assigned to NULL.
>
> Remove unnecessary duplicate NULL tests on the same value
> that has previously been tested.
>
> Found by Coccinelle.
>
> Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@xxxxxxxxx>
> ---

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter