Re: [PATCH v2 1/2] staging: rtl8723bs: fix stainfo check in rtw_aes_decrypt
From: Dan Carpenter
Date: Thu Apr 16 2026 - 17:21:15 EST
On Thu, Apr 16, 2026 at 10:42:07PM +0200, Luka Gejak wrote:
> On Thu Apr 16, 2026 at 9:53 PM CEST, Maksym Pikhotskyi wrote:
> > The null-pointer-guard was incorrect, returning _FAIL on valid pointer.
> > Invert the guard, so it returns _FAIL on invalid pointer.
> >
> > Fixes: e23ad1570028 ("staging: rtl8723bs: use guard clause for stainfo check")
> > Signed-off-by: Maksym Pikhotskyi <mpikhotskyi@xxxxxxxxx>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index a00504ff2910..f467cb5b1dca 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1212,7 +1212,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
> > if (prxattrib->encrypt != _AES_)
> > return _SUCCESS;
> > stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
> > - if (stainfo)
> > + if (!stainfo)
> > return _FAIL;
> > if (is_multicast_ether_addr(prxattrib->ra)) {
> > static unsigned long start;
>
> You should Cc stable.
The bug isn't in any stable releases so no need to Cc stable.
regards,
dan carpenter