From: Jie Liu <jeff.liu@xxxxxxxxxx> 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@xxxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx> --- 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 majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html