[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>

authored by Jaroslav Kysela and committed by Linus Torvalds 30d5b64b 518e6540

+2
+2
drivers/pnp/card.c
··· 312 312 if (drv->link.driver.probe) { 313 313 if (drv->link.driver.probe(&dev->dev)) { 314 314 dev->dev.driver = NULL; 315 + dev->card_link = NULL; 316 + up_write(&dev->dev.bus->subsys.rwsem); 315 317 return NULL; 316 318 } 317 319 }