提交 30d5b64b 编写于 作者: J Jaroslav Kysela 提交者: Linus Torvalds

[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: NJaroslav Kysela <perex@suse.cz>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 518e6540
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册