All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 04/14] memstick: core: fix device_register() error handling
@ 2010-09-19 12:54 ` Vasiliy Kulikov
  0 siblings, 0 replies; 26+ messages in thread
From: Vasiliy Kulikov @ 2010-09-19 12:54 UTC (permalink / raw)
  To: kernel-janitors; +Cc: Andrew Morton, Tejun Heo, Jiri Slaby, 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/memstick/core/memstick.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c
index c00fe82..4303b7e 100644
--- a/drivers/memstick/core/memstick.c
+++ b/drivers/memstick/core/memstick.c
@@ -465,6 +465,7 @@ static void memstick_check(struct work_struct *work)
 		if (!host->card) {
 			host->card = card;
 			if (device_register(&card->dev)) {
+				put_device(&card->dev);
 				kfree(host->card);
 				host->card = NULL;
 			}
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-09-23 12:10 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-19 12:54 [PATCH 04/14] memstick: core: fix device_register() error handling Vasiliy Kulikov
2010-09-19 12:54 ` Vasiliy Kulikov
2010-09-21 22:20 ` [PATCH 04/14] memstick: core: fix device_register() error Andrew Morton
2010-09-21 22:20   ` [PATCH 04/14] memstick: core: fix device_register() error handling Andrew Morton
2010-09-21 22:49   ` [PATCH 04/14] memstick: core: fix device_register() error Greg KH
2010-09-21 22:49     ` [PATCH 04/14] memstick: core: fix device_register() error handling Greg KH
2010-09-22  8:53     ` Kay Sievers
2010-09-22  8:53       ` Kay Sievers
2010-09-22 10:02       ` Boaz Harrosh
2010-09-22 10:02         ` Boaz Harrosh
2010-09-22 15:47         ` [PATCH 04/14] memstick: core: fix device_register() error Greg KH
2010-09-22 15:47           ` [PATCH 04/14] memstick: core: fix device_register() error handling Greg KH
2010-09-22 15:56           ` [PATCH 04/14] memstick: core: fix device_register() error James Bottomley
2010-09-22 15:56             ` [PATCH 04/14] memstick: core: fix device_register() error handling James Bottomley
2010-09-22 16:20             ` [PATCH 04/14] memstick: core: fix device_register() error Greg KH
2010-09-22 16:20               ` [PATCH 04/14] memstick: core: fix device_register() error handling Greg KH
2010-09-22 16:23               ` [PATCH 04/14] memstick: core: fix device_register() error James Bottomley
2010-09-22 16:23                 ` [PATCH 04/14] memstick: core: fix device_register() error handling James Bottomley
2010-09-22 15:50       ` [PATCH 04/14] memstick: core: fix device_register() error Greg KH
2010-09-22 15:50         ` [PATCH 04/14] memstick: core: fix device_register() error handling Greg KH
2010-09-23 12:10         ` [PATCH 04/14] memstick: core: fix device_register() error Vasiliy Kulikov
2010-09-23 12:10           ` [PATCH 04/14] memstick: core: fix device_register() error handling Vasiliy Kulikov
2010-09-22  9:58     ` Boaz Harrosh
2010-09-22  9:58       ` Boaz Harrosh
2010-09-22 15:46       ` [PATCH 04/14] memstick: core: fix device_register() error Greg KH
2010-09-22 15:46         ` [PATCH 04/14] memstick: core: fix device_register() error handling Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.