diff options
author | Alan <gnomes@lxorguk.ukuu.org.uk> | 2013-12-04 15:31:52 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 07:45:11 -0800 |
commit | 8a8e917f784930fe2f18a5b559f3860446d5a32b (patch) | |
tree | 42044338c266dab37ecd6d833cc31b64c1894358 /drivers/watchdog | |
parent | 4d72984a5893a40e0990080d6036646a688cd493 (diff) | |
download | linux-3.10-8a8e917f784930fe2f18a5b559f3860446d5a32b.tar.gz linux-3.10-8a8e917f784930fe2f18a5b559f3860446d5a32b.tar.bz2 linux-3.10-8a8e917f784930fe2f18a5b559f3860446d5a32b.zip |
sc1200_wdt: Fix oops
commit dace8bbfccfd9e4fcccfffcfbd82881fda3e756f upstream.
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/sc1200wdt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c index 3fb83b0c28c..ab6d3f56cbc 100644 --- a/drivers/watchdog/sc1200wdt.c +++ b/drivers/watchdog/sc1200wdt.c @@ -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)) { |