staging: rtl8723bs: bug or pointless if else ?

Greg Kroah-Hartman gregkh at linuxfoundation.org
Thu Jun 28 10:24:17 UTC 2018


On Thu, Jun 28, 2018 at 09:43:47AM +0200, Michael Straube wrote:
> Hi,
> 
> I stumbled upon the following if else construct in
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c:618
> 
>         if (pwrpriv->bInternalAutoSuspend)
>         {
>                 ret = rtw_resume_process(padapter);
>         }
>         else
>         {
>                 if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode)
>                 {
>                         ret = rtw_resume_process(padapter);
>                 }
>                 else
>                 {
>                         ret = rtw_resume_process(padapter);
>                 }
>         }
> 
> It does not matter if the conditions are true or not,
> ret is always set to:
> 
> ret = rtw_resume_process(padapter)
> 
> Is this a bug or is the if else construct just pointless?

Looks pretty pointless...


More information about the devel mailing list