From: Jie Liu <jeff....@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 <jbottom...@parallels.com>
Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Signed-off-by: Jie Liu <jeff....@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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to