Skip to content

Commit

Permalink
watchdog: mpc8xxx: use better error code when watchdog cannot be enabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Wim Van Sebroeck committed Sep 9, 2015
1 parent 7997eba commit 72cd501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/mpc8xxx_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 72cd501

Please sign in to comment.