diff mbox series

[linux-next] mmc: sdhci_am654: Remove the unneeded result variable

Message ID 20220830083349.276709-1-ye.xingchen@zte.com.cn
State New
Headers show
Series [linux-next] mmc: sdhci_am654: Remove the unneeded result variable | expand

Commit Message

Lv Ruyi Aug. 30, 2022, 8:33 a.m. UTC
From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value cqhci_init() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 drivers/mmc/host/sdhci_am654.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Adrian Hunter Aug. 30, 2022, 10:46 a.m. UTC | #1
On 30/08/22 11:33, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
> 
> Return the value cqhci_init() directly instead of storing it in another
> redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci_am654.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index e7ced1496a07..8f1023480e12 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -554,7 +554,6 @@ static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
>  static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
>  {
>  	struct cqhci_host *cq_host;
> -	int ret;
>  
>  	cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
>  			       GFP_KERNEL);
> @@ -568,9 +567,7 @@ static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
>  
>  	host->mmc->caps2 |= MMC_CAP2_CQE;
>  
> -	ret = cqhci_init(cq_host, host->mmc, 1);
> -
> -	return ret;
> +	return cqhci_init(cq_host, host->mmc, 1);
>  }
>  
>  static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
Ulf Hansson Sept. 1, 2022, 10:31 a.m. UTC | #2
On Tue, 30 Aug 2022 at 10:33, <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value cqhci_init() directly instead of storing it in another
> redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci_am654.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
> index e7ced1496a07..8f1023480e12 100644
> --- a/drivers/mmc/host/sdhci_am654.c
> +++ b/drivers/mmc/host/sdhci_am654.c
> @@ -554,7 +554,6 @@ static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
>  static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
>  {
>         struct cqhci_host *cq_host;
> -       int ret;
>
>         cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
>                                GFP_KERNEL);
> @@ -568,9 +567,7 @@ static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
>
>         host->mmc->caps2 |= MMC_CAP2_CQE;
>
> -       ret = cqhci_init(cq_host, host->mmc, 1);
> -
> -       return ret;
> +       return cqhci_init(cq_host, host->mmc, 1);
>  }
>
>  static int sdhci_am654_get_otap_delay(struct sdhci_host *host,
> --
> 2.25.1
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci_am654.c b/drivers/mmc/host/sdhci_am654.c
index e7ced1496a07..8f1023480e12 100644
--- a/drivers/mmc/host/sdhci_am654.c
+++ b/drivers/mmc/host/sdhci_am654.c
@@ -554,7 +554,6 @@  static const struct cqhci_host_ops sdhci_am654_cqhci_ops = {
 static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 {
 	struct cqhci_host *cq_host;
-	int ret;
 
 	cq_host = devm_kzalloc(mmc_dev(host->mmc), sizeof(struct cqhci_host),
 			       GFP_KERNEL);
@@ -568,9 +567,7 @@  static int sdhci_am654_cqe_add_host(struct sdhci_host *host)
 
 	host->mmc->caps2 |= MMC_CAP2_CQE;
 
-	ret = cqhci_init(cq_host, host->mmc, 1);
-
-	return ret;
+	return cqhci_init(cq_host, host->mmc, 1);
 }
 
 static int sdhci_am654_get_otap_delay(struct sdhci_host *host,