diff mbox

[-next] spi: txx9: drop clk_put for devm_clk_get in txx9spi_probe()

Message ID CAPgLHd_94fMwOm1Z-=4ojrhH35WHve4piJkEC5Fh8k8OZcTfsQ@mail.gmail.com (mailing list archive)
State Accepted
Commit bdf0290ac70f5a09e85507bf6c84dc6a399dff82
Headers show

Commit Message

Wei Yongjun Dec. 20, 2013, 2:15 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

devm_clk_get() is used so there is no reason to explicitly
call clk_put() in txx9spi_probe() functions.

Fixes: 18e34d568efa ('spi: txx9: Use devm_clk_get()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/spi/spi-txx9.c | 1 -
 1 file changed, 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jingoo Han Dec. 20, 2013, 2:35 a.m. UTC | #1
On Friday, December 20, 2013 11:16 AM, Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> devm_clk_get() is used so there is no reason to explicitly
> call clk_put() in txx9spi_probe() functions.
> 
> Fixes: 18e34d568efa ('spi: txx9: Use devm_clk_get()')
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/spi/spi-txx9.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c
> index ffbe03d..6191ced 100644
> --- a/drivers/spi/spi-txx9.c
> +++ b/drivers/spi/spi-txx9.c
> @@ -356,7 +356,6 @@ static int txx9spi_probe(struct platform_device *dev)
>  	}
>  	ret = clk_enable(c->clk);
>  	if (ret) {
> -		clk_put(c->clk);

Oops, I didn't remove this clk_put().
You're right. Thank you for fixing this.

Reviewed-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

>  		c->clk = NULL;
>  		goto exit;
>  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Dec. 20, 2013, 11:56 a.m. UTC | #2
On Fri, Dec 20, 2013 at 10:15:45AM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> devm_clk_get() is used so there is no reason to explicitly
> call clk_put() in txx9spi_probe() functions.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-txx9.c b/drivers/spi/spi-txx9.c
index ffbe03d..6191ced 100644
--- a/drivers/spi/spi-txx9.c
+++ b/drivers/spi/spi-txx9.c
@@ -356,7 +356,6 @@  static int txx9spi_probe(struct platform_device *dev)
 	}
 	ret = clk_enable(c->clk);
 	if (ret) {
-		clk_put(c->clk);
 		c->clk = NULL;
 		goto exit;
 	}