public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Ladislav Michl <ladis@linux-mips.org>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] mmci-omap: remove bogus check for host->iclk
Date: Thu, 22 Oct 2009 14:59:30 -0700	[thread overview]
Message-ID: <20091022215930.GY16230@atomide.com> (raw)
In-Reply-To: <20091021125217.GB8525@localhost.localdomain>

* Ladislav.Michl@seznam.cz <Ladislav.Michl@seznam.cz> [091021 03:52]:
> Remove check for host->iclk being NULL from error path since we already know
> it is non-null and use return value from clk_get.
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

This too to the mmc list. Might not go in as a fix though.

Acked-by: Tony Lindgren <tony@atomide.com>

> 
> diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
> index 5d773b8..c6d7e8e 100644
> --- a/drivers/mmc/host/omap.c
> +++ b/drivers/mmc/host/omap.c
> @@ -1459,8 +1459,10 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
>  		goto err_ioremap;
>  
>  	host->iclk = clk_get(&pdev->dev, "ick");
> -	if (IS_ERR(host->iclk))
> +	if (IS_ERR(host->iclk)) {
> +		ret = PTR_ERR(host->iclk);
>  		goto err_free_mmc_host;
> +	}
>  	clk_enable(host->iclk);
>  
>  	host->fclk = clk_get(&pdev->dev, "fck");
> @@ -1500,10 +1502,8 @@ err_free_irq:
>  err_free_fclk:
>  	clk_put(host->fclk);
>  err_free_iclk:
> -	if (host->iclk != NULL) {
> -		clk_disable(host->iclk);
> -		clk_put(host->iclk);
> -	}
> +	clk_disable(host->iclk);
> +	clk_put(host->iclk);
>  err_free_mmc_host:
>  	iounmap(host->virt_base);
>  err_ioremap:
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2009-10-22 21:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 12:52 [PATCH] mmci-omap: remove bogus check for host->iclk Ladislav.Michl
2009-10-22 21:59 ` Tony Lindgren [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=20091022215930.GY16230@atomide.com \
    --to=tony@atomide.com \
    --cc=ladis@linux-mips.org \
    --cc=linux-omap@vger.kernel.org \
    /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