[PATCH v2 09/15] watchdog: orion: Add per-compatible clock initialization
Fabio Estevam
festevam at gmail.com
Tue Jan 21 04:18:44 EST 2014
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.
Regards,
Fabio Estevam
More information about the linux-arm-kernel
mailing list