Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sc1200_wdt: Fix oops

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

authored by

Alan and committed by
Wim Van Sebroeck
dace8bbf 9539210e

+2 -1
+2 -1
drivers/watchdog/sc1200wdt.c
··· 409 409 #if defined CONFIG_PNP 410 410 /* now that the user has specified an IO port and we haven't detected 411 411 * any devices, disable pnp support */ 412 + if (isapnp) 413 + pnp_unregister_driver(&scl200wdt_pnp_driver); 412 414 isapnp = 0; 413 - pnp_unregister_driver(&scl200wdt_pnp_driver); 414 415 #endif 415 416 416 417 if (!request_region(io, io_len, SC1200_MODULE_NAME)) {