Re: [PATCH v6 1/2] staging: rtl8723bs: Remove duplicate NULL tests on pstat

Andy Shevchenko
2025-04-19T16:23:54Z

On Fri, Apr 18, 2025 at 03:41:56PM +0000, Abraham Samuel Adekunle wrote:
> The pstat pointer has been previously tested for NULL after being
> initialized as seen from line 970-973 of the file.
> The first NULL test is shown below:

> pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
> if (!pstat) {
> status = WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA;
> goto asoc_class2_error;
> }

It's too much for such a change. You can do that in the comment area
(after '---' line below), or drop it completely. You can rephrase that
the pointer is checked before the changed lines.

> Remove the second NULL test to avoid redundancy in code.
>
> Found by Coccinelle

Missing period.

--
With Best Regards,
Andy Shevchenko