diff options
Diffstat (limited to 'drivers/char/watchdog/pnx4008_wdt.c')
-rw-r--r-- | drivers/char/watchdog/pnx4008_wdt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c index 3a55fc6abcd..5991add702b 100644 --- a/drivers/char/watchdog/pnx4008_wdt.c +++ b/drivers/char/watchdog/pnx4008_wdt.c @@ -238,7 +238,7 @@ static int pnx4008_wdt_release(struct inode *inode, struct file *file) return 0; } -static struct file_operations pnx4008_wdt_fops = { +static const struct file_operations pnx4008_wdt_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .write = pnx4008_wdt_write, @@ -283,7 +283,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev) wdt_base = (void __iomem *)IO_ADDRESS(res->start); wdt_clk = clk_get(&pdev->dev, "wdt_ck"); - if (!wdt_clk) { + if (IS_ERR(wdt_clk)) { + ret = PTR_ERR(wdt_clk); release_resource(wdt_mem); kfree(wdt_mem); goto out; |