tree 16b55bd8beb2b56b459db5ef100b881243597f7a
parent 518e6540831c69422faecceee8f964bd439ac9d0
author Jaroslav Kysela <[EMAIL PROTECTED]> Thu, 18 Aug 2005 13:16:11 +0200
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 18 Aug 2005 22:43:59 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/pnp/card.c |    2 ++
 1 files changed, 2 insertions(+)

diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
--- 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;
                }
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to