[PATCH v2 09/15] watchdog: orion: Add per-compatible clock initialization
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Tue Jan 21 04:43:14 EST 2014
On Tue, Jan 21, 2014 at 07:18:44AM -0200, Fabio Estevam wrote:
> On Tue, Jan 21, 2014 at 7:12 AM, Ezequiel Garcia
> <ezequiel.garcia at free-electrons.com> wrote:
>
> > +static int orion_wdt_clock_init(struct platform_device *pdev,
> > + struct orion_watchdog *dev)
> > +{
> > + dev->clk = devm_clk_get(&pdev->dev, NULL);
> > + if (IS_ERR(dev->clk))
> > + return -ENODEV;
>
> Shouldn't it be 'return PTR_ERR(dev->clk)' instead?
>
>
[..]
> > + clk_prepare_enable(dev->clk);
>
> clk_prepare_enable may fail, so better check its return value.
>
Indeed.
Thanks!
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the linux-arm-kernel
mailing list