watchdog: mpc8xxx: use better error code when watchdog cannot be enabled
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 12 Aug 2015 08:15:57 +0000 (10:15 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 9 Sep 2015 19:37:51 +0000 (21:37 +0200)
checkpatch warns about ENOSYS, telling "ENOSYS means 'invalid syscall
nr' and nothing else". So use ENODEV instead.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/mpc8xxx_wdt.c

index 0b69797d34172a6f33d74466d903288be5597afa..5f2273aac37d5df1115e516bf5b6544967b89353 100644 (file)
@@ -170,7 +170,7 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev)
        enabled = in_be32(&ddata->base->swcrr) & SWCRR_SWEN;
        if (!enabled && wdt_type->hw_enabled) {
                pr_info("could not be enabled in software\n");
-               return -ENOSYS;
+               return -ENODEV;
        }
 
        spin_lock_init(&ddata->lock);