lkml.org 
[lkml]   [2018]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: staging: rtl8723bs: bug or pointless if else ?
From
Date
On Thu, 2018-06-28 at 10:22 +0200, Hans de Goede wrote:
> Hi,
>
> On 28-06-18 09:43, 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?
>
> It probably is just pointless, my guess would be that once
> upon a time there was a difference in the paths and at some
> point that difference went away.

Quite:
https://github.com/hadess/rtl8723bs/blob/7d36e26f78bbc709844c12ad0c62e3e8503fdbc5/os_dep/linux/sdio_intf.c#L1757

\
 
 \ /
  Last update: 2018-06-28 12:08    [W:0.105 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site