mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
[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 <perex@suse.cz> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
518e654083
commit
30d5b64b63
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue