All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/24] drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_kset
@ 2014-06-17 14:34 Jeff Liu
  2014-06-17 19:22 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Liu @ 2014-06-17 14:34 UTC (permalink / raw)
  To: JBottomley, gregkh; +Cc: linux-scsi

From: Jie Liu <jeff.liu@oracle.com>

kset_create_and_add() has been fixed to return the actual error ptr
than NULL on failure, update iscsi_boot_create_kset() to check the
return value via IS_ERR() accordingly.

Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
 drivers/scsi/iscsi_boot_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/iscsi_boot_sysfs.c b/drivers/scsi/iscsi_boot_sysfs.c
index 680bf6f..821df62 100644
--- a/drivers/scsi/iscsi_boot_sysfs.c
+++ b/drivers/scsi/iscsi_boot_sysfs.c
@@ -443,7 +443,7 @@ struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name)
 		return NULL;
 
 	boot_kset->kset = kset_create_and_add(set_name, NULL, firmware_kobj);
-	if (!boot_kset->kset) {
+	if (IS_ERR(boot_kset->kset)) {
 		kfree(boot_kset);
 		return NULL;
 	}
-- 
1.8.3.2

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

end of thread, other threads:[~2014-06-17 19:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:34 [PATCH 11/24] drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_kset Jeff Liu
2014-06-17 19:22 ` 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.