drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_kset
PATCH 11/24 drviers/scsi: check sysfs init return value via IS_ERR at iscsi_boot_create_kset
From: Jie Liu <[email protected]>
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 <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Jie Liu <[email protected]>
--- drivers/scsi/iscsi_boot_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/iscsi_boot_sysfs.c +1 -1
@@ -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 ; }
Signature · 1 line
1.8.3.2
Quoted 18 lines · Jeff Liu
From: Jie Liu <[email protected]>
kset_create_and_add()has been fixed to return the actual error ptr than NULL on failure, updateiscsi_boot_create_kset()to check the return value viaIS_ERR()accordingly.Cc James E.J. Bottomley <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Signed-off-by Jie Liu <[email protected]>--- drivers/scsi/iscsi_boot_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/iscsi_boot_sysfs.c +0
-0
drivers/scsi/iscsi_boot_sysfs.c struct iscsi_boot_kset *iscsi_boot_create_kset(const char *set_name) · line 449
Quoted 8 lines
drivers/scsi/iscsi_boot_sysfs.c +1
-1@@ -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 ; }
James, please do not take this patch.
thanks,
greg k-h