Re: [PATCH 4/4] i2c: rcar: use devm_clk_get to ensure clock is properly ref-counted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 17, 2014 at 06:11:38PM +0000, Ben Dooks wrote:
> The current i2c-rcar driver does clk_get() without a corresponding
> clk_put(). Add the clk to the driver private data and then get it
> with the devm functions so that it is released when the driver is
> unbound.
> 

>  
> +	priv->clk = devm_clk_get(dev, NULL);
> +	if (IS_ERR(priv->clk)) {
> +		dev_err(dev, "cannot get clock\n");
> +		return -ENOENT;
> +	}

Return the error here?

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux