public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	kernel@collabora.com, kernel-janitors@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rt8188eu: Remove dead code
Date: Sun, 30 Jan 2022 18:54:00 +0100	[thread overview]
Message-ID: <YfbQuA6SSIEXGrWu@martin-debian-1.paytec.ch> (raw)
In-Reply-To: <20220128111954.1028121-1-usama.anjum@collabora.com>

Thus wrote Muhammad Usama Anjum (usama.anjum@collabora.com):

> rtStatus is _SUCCESS when the execution reaches this if condition.
> Remove the dead code.

> Fixes: 67396d2dfef3 ("staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
>  drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 3 ---
>  1 file changed, 3 deletions(-)

> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> index 0b0690dfb947c..41a0d7f0d29f4 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
> @@ -504,9 +504,6 @@ static	int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
>  		ODM_ReadAndConfig_PHY_REG_PG_8188E(&pHalData->odmpriv);
>  	}

> -	if (rtStatus != _SUCCESS)
> -		goto phy_BB8190_Config_ParaFile_Fail;
> -
>  	/*  3. BB AGC table Initialization */
>  	if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalData->odmpriv))
>  		rtStatus = _FAIL;
> -- 
> 2.30.2

Thanks for spotting this. It makes sense to remove this duplicate check.

Acked-by: Martin Kaiser <martin@kaiser.cx>

Looking at the function again, the rest of the error handling should be
cleaned up as well. I'll send a patch for this.

      parent reply	other threads:[~2022-01-30 17:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 11:19 [PATCH] staging: rt8188eu: Remove dead code Muhammad Usama Anjum
2022-01-28 11:23 ` Dan Carpenter
2022-01-28 11:24   ` Muhammad Usama Anjum
2022-01-30 17:54 ` Martin Kaiser [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=YfbQuA6SSIEXGrWu@martin-debian-1.paytec.ch \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    --cc=usama.anjum@collabora.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