* [PATCH 06/14] pcmcia: cs: fix device_register() error handling
@ 2010-09-19 12:54 Vasiliy Kulikov
2010-09-19 13:23 ` Dominik Brodowski
0 siblings, 1 reply; 2+ messages in thread
From: Vasiliy Kulikov @ 2010-09-19 12:54 UTC (permalink / raw)
To: kernel-janitors
Cc: Dominik Brodowski, Rafael J. Wysocki, linux-pcmcia, linux-kernel
If device_register() fails then call put_device().
See comment to device_register.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
compile tested.
drivers/pcmcia/cs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index d8189d4..9e8ab51 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -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;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-19 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-19 12:54 [PATCH 06/14] pcmcia: cs: fix device_register() error handling Vasiliy Kulikov
2010-09-19 13:23 ` Dominik Brodowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox