Commit dace8bbf authored by Alan's avatar Alan Committed by Wim Van Sebroeck

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: default avatarAlan Cox <alan@linux.intel.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Partially-Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=53991
parent 9539210e
...@@ -409,8 +409,9 @@ static int __init sc1200wdt_init(void) ...@@ -409,8 +409,9 @@ static int __init sc1200wdt_init(void)
#if defined CONFIG_PNP #if defined CONFIG_PNP
/* now that the user has specified an IO port and we haven't detected /* now that the user has specified an IO port and we haven't detected
* any devices, disable pnp support */ * any devices, disable pnp support */
if (isapnp)
pnp_unregister_driver(&scl200wdt_pnp_driver);
isapnp = 0; isapnp = 0;
pnp_unregister_driver(&scl200wdt_pnp_driver);
#endif #endif
if (!request_region(io, io_len, SC1200_MODULE_NAME)) { if (!request_region(io, io_len, SC1200_MODULE_NAME)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment