Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30d5b64b authored by Jaroslav Kysela's avatar Jaroslav Kysela Committed by Linus Torvalds
Browse files

[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: default avatarJaroslav Kysela <perex@suse.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 518e6540
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
		}
	}