Re: [PATCH v5] staging: rtl8723bs: Prevent duplicate NULL tests on a value
Dan Carpenter <[email protected]> Sat, 5 Apr 2025 17:58:32 +0300
| Newsgroups | dev.linux.lists.outreachy,dev.linux.lists.linux-staging,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > --- Reviewed-by: Dan Carpenter <[email protected]> regards, dan carpenter