Re: AT91SAM9/CAP9 watchdog driver

From: Andrew Morton
Date: Tue Jun 03 2008 - 17:23:58 EST


On Sun, 1 Jun 2008 18:40:46 +0200
"Andrew Victor" <avictor.za@xxxxxxxxx> wrote:

> +static int __init at91wdt_probe(struct platform_device *pdev)
> +{
> + int res;
> +
> + if (at91wdt_miscdev.parent)
> + return -EBUSY;
> + at91wdt_miscdev.parent = &pdev->dev;
> +
> + res = misc_register(&at91wdt_miscdev);
> + if (res)
> + return res;
> +
> + /* Set watchdog */
> + if (at91_wdt_settimeout(wdt_timeout) == -EINVAL) {
> + pr_info("at91sam9_wdt: timeout must be between 1 and %d.\n",
> + WDT_MAX_TIME);

Would printk(KERN_ERR be more appropriate here?

> + return 0;

That looks like the wrong return value?

> + }
> +
> + return 0;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/