Skip to content

Commit

Permalink
sc1200_wdt: Fix oops
Browse files Browse the repository at this point in the history
If loaded with isapnp = 0 the driver explodes. This is catching
people out now and then. What should happen in the working case is
a complete mystery and the code appears terminally confused, but we
can at least make the error path work properly.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Partially-Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=53991
  • Loading branch information
Alan authored and Wim Van Sebroeck committed Dec 10, 2013
1 parent 9539210 commit dace8bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/watchdog/sc1200wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,9 @@ static int __init sc1200wdt_init(void)
#if defined CONFIG_PNP
/* now that the user has specified an IO port and we haven't detected
* any devices, disable pnp support */
if (isapnp)
pnp_unregister_driver(&scl200wdt_pnp_driver);
isapnp = 0;
pnp_unregister_driver(&scl200wdt_pnp_driver);
#endif

if (!request_region(io, io_len, SC1200_MODULE_NAME)) {
Expand Down

0 comments on commit dace8bb

Please sign in to comment.