All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 10/14] scsi: osd: fix device_register() error handling
@ 2010-09-19 12:55 ` Vasiliy Kulikov
  0 siblings, 0 replies; 25+ messages in thread
From: Vasiliy Kulikov @ 2010-09-19 12:55 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Boaz Harrosh, Benny Halevy, James E.J. Bottomley, Tejun Heo,
	Arnd Bergmann, osd-dev, linux-scsi, 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/scsi/osd/osd_uld.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index cefb2c0..3e0edc2 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -474,7 +474,7 @@ static int osd_probe(struct device *dev)
 	error = device_register(&oud->class_dev);
 	if (error) {
 		OSD_ERR("device_register failed => %d\n", error);
-		goto err_put_cdev;
+		goto err_put_device;
 	}
 
 	get_device(&oud->class_dev);
@@ -482,6 +482,8 @@ static int osd_probe(struct device *dev)
 	OSD_INFO("osd_probe %s\n", disk->disk_name);
 	return 0;
 
+err_put_device:
+	put_device(&oud->class_dev);
 err_put_cdev:
 	cdev_del(&oud->cdev);
 err_put_disk:
-- 
1.7.0.4


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

end of thread, other threads:[~2010-09-20 16:31 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-19 12:55 [PATCH 10/14] scsi: osd: fix device_register() error handling Vasiliy Kulikov
2010-09-19 12:55 ` Vasiliy Kulikov
2010-09-19 14:26 ` Dan Carpenter
2010-09-19 14:26   ` Dan Carpenter
2010-09-19 14:39   ` Vasiliy Kulikov
2010-09-19 14:39   ` Vasiliy Kulikov
2010-09-19 14:39     ` Vasiliy Kulikov
2010-09-19 15:12     ` Dan Carpenter
2010-09-19 15:12       ` Dan Carpenter
2010-09-20 11:58   ` James Bottomley
2010-09-20 11:58     ` James Bottomley
2010-09-20 15:10     ` Greg KH
2010-09-20 15:10       ` Greg KH
2010-09-20 15:13       ` Greg KH
2010-09-20 15:13         ` Greg KH
2010-09-20 15:21         ` James Bottomley
2010-09-20 15:21           ` James Bottomley
2010-09-20 15:42           ` Boaz Harrosh
2010-09-20 15:42             ` Boaz Harrosh
2010-09-20 15:55             ` James Bottomley
2010-09-20 15:55               ` James Bottomley
2010-09-20 16:31               ` Boaz Harrosh
2010-09-20 16:31                 ` Boaz Harrosh
2010-09-19 15:32 ` Boaz Harrosh
2010-09-19 15:32   ` Boaz Harrosh

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.