From: Jaroslav Kysela Date: Thu, 18 Aug 2005 11:16:11 +0000 (+0200) Subject: [PATCH] broken error path in drivers/pnp/card.c X-Git-Tag: v2.6.13-rc7~60^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=30d5b64b63fa69af31b2cba32e6d71d68526eec9;p=linux-2.6-omap-h63xx.git [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 --- 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; } }