From 30d5b64b63fa69af31b2cba32e6d71d68526eec9 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 18 Aug 2005 13:16:11 +0200 Subject: [PATCH] broken error path in drivers/pnp/card.c The error path in pnp_request_card_device() is broken (one variable is left initialized and the semaphore is not unlocked). This fixes it (and has been tested). Signed-off-by: Jaroslav Kysela Signed-off-by: Linus Torvalds --- drivers/pnp/card.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/pnp/card.c') diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index add12f7c489..6e5229e92fb 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -312,6 +312,8 @@ found: if (drv->link.driver.probe) { if (drv->link.driver.probe(&dev->dev)) { dev->dev.driver = NULL; + dev->card_link = NULL; + up_write(&dev->dev.bus->subsys.rwsem); return NULL; } } -- cgit v1.2.3 From e139aa595c5d3bd01699530cbe017dec75fdb07f Mon Sep 17 00:00:00 2001 From: Bjorn Helgaas Date: Tue, 6 Sep 2005 15:17:05 -0700 Subject: [PATCH] PNP: make pnp_dbg conditional directly on CONFIG_PNP_DEBUG Seems pointless to require .c files to test CONFIG_PNP_DEBUG and conditionally define DEBUG before including . Just test CONFIG_PNP_DEBUG directly in pnp.h. Signed-off-by: Bjorn Helgaas Cc: Adam Belay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pnp/card.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/pnp/card.c') diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 6e5229e92fb..e95ed67d4f0 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -8,13 +8,6 @@ #include #include #include - -#ifdef CONFIG_PNP_DEBUG - #define DEBUG -#else - #undef DEBUG -#endif - #include #include "base.h" -- cgit v1.2.3