Skip to contentSkip to conversation

pcmcia: cs: fix device_register() error handling

PATCH Applied Vasiliy Kulikov 2 participants 2 messages Sep 19, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/14 pcmcia: cs: fix device_register() error handling

If device_register() fails then call put_device(). See comment to device_register.

---
compile tested.

 drivers/pcmcia/cs.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/pcmcia/cs.c +1 -0
index d8189d4..9e8ab51 100644
@@ -592,6 +592,7 @@ static int pccardd(void *__skt)
 	if (ret) {
 		dev_printk(KERN_WARNING, &skt->dev,
 			   "PCMCIA: unable to register socket\n");
+		put_device(&skt->dev);
 		skt->thread = NULL;
 		complete(&skt->thread_done);
 		return 0;
Signature · 1 line
1.7.0.4