Skip to content

Commit

Permalink
[PATCH] broken error path in drivers/pnp/card.c
Browse files Browse the repository at this point in the history
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 <perex@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jaroslav Kysela authored and Linus Torvalds committed Aug 18, 2005
1 parent 518e654 commit 30d5b64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char
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;
}
}
Expand Down

0 comments on commit 30d5b64

Please sign in to comment.