Thread (1 message) 1 message, 1 author, 2014-01-21

[PATCH v2 09/15] watchdog: orion: Add per-compatible clock initialization

From: festevam@gmail.com (Fabio Estevam)
Date: 2014-01-21 09:18:44
Also in: linux-devicetree, linux-watchdog

On Tue, Jan 21, 2014 at 7:12 AM, Ezequiel Garcia
[off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help