All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sc1200_wdt: Fix oops
@ 2013-12-04 15:31 Alan
  2013-12-04 16:31 ` Guenter Roeck
  0 siblings, 1 reply; 4+ messages in thread
From: Alan @ 2013-12-04 15:31 UTC (permalink / raw)
  To: wim, linux-watchdog

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>
Partially-Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=53991
---
 drivers/watchdog/sc1200wdt.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/watchdog/sc1200wdt.c b/drivers/watchdog/sc1200wdt.c
index 3b9fff9..131193a 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)) {


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-05  2:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-04 15:31 [PATCH] sc1200_wdt: Fix oops Alan
2013-12-04 16:31 ` Guenter Roeck
2013-12-05  0:15   ` One Thousand Gnomes
2013-12-05  2:46     ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.