public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: add put_device() after device_find_child()
@ 2013-05-06 11:55 Zhao Hongjiang
  2013-05-06 17:06 ` Mike Christie
  0 siblings, 1 reply; 3+ messages in thread
From: Zhao Hongjiang @ 2013-05-06 11:55 UTC (permalink / raw)
  To: JBottomley; +Cc: ravi.anand, vikas.chaudhary, linux-scsi

The qla4xxx_sysfs_ddb_add() function uses device_find_child() but it does not drop
the reference of the retrieved child.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
---
 drivers/scsi/qla4xxx/ql4_os.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index a47f999..b378d9e 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -5605,6 +5605,7 @@ static int qla4xxx_sysfs_ddb_add(struct Scsi_Host *shost, const char *buf,
 		ql4_printk(KERN_ERR, ha,
 			   "%s: A non-persistent entry %s found\n",
 			   __func__, dev->kobj.name);
+		put_device(dev);
 		goto exit_ddb_add;
 	}
 
-- 
1.7.1


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

end of thread, other threads:[~2013-05-08 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 11:55 [PATCH] scsi: add put_device() after device_find_child() Zhao Hongjiang
2013-05-06 17:06 ` Mike Christie
2013-05-08 12:46   ` Vikas Chaudhary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox