mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Michael Straube <straube.linux@gmail.com>
Cc: hadess@hadess.net, hdegoede@redhat.com,
	Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: staging: rtl8723bs: bug or pointless if else ?
Date: Thu, 28 Jun 2018 19:24:17 +0900	[thread overview]
Message-ID: <20180628102417.GA30782@kroah.com> (raw)
In-Reply-To: <473d9997-8c30-a3f3-85b6-076decc7a7c2@gmail.com>

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...

      parent reply	other threads:[~2018-06-28 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28  7:43 Michael Straube
2018-06-28  8:22 ` Hans de Goede
2018-06-28  9:34   ` Bastien Nocera
2018-06-28 15:00     ` Michael Straube
2018-06-28 15:01       ` Hans de Goede
2018-06-28 20:36     ` Joe Perches
2018-06-28 10:24 ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180628102417.GA30782@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome