Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9cd44619 authored by Akinobu Mita's avatar Akinobu Mita Committed by Wim Van Sebroeck
Browse files

[WATCHDOG] fix clk_get() error check



The return value of clk_get() should be checked by IS_ERR().

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 0b6dd8a6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -393,9 +393,9 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
	}

	wdt_clock = clk_get(&pdev->dev, "watchdog");
	if (wdt_clock == NULL) {
	if (IS_ERR(wdt_clock)) {
		printk(KERN_INFO PFX "failed to find watchdog clock source\n");
		ret =  -ENOENT;
		ret = PTR_ERR(wdt_clock);
		goto err_irq;
	}