From: Jie Liu <jeff.liu@xxxxxxxxxx> Return the actual error code if call kset_create_and_add() failed at drivers/s390 subsystems. Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx> --- drivers/s390/char/sclp_cpi_sys.c | 4 ++-- drivers/s390/char/sclp_ocf.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/s390/char/sclp_cpi_sys.c b/drivers/s390/char/sclp_cpi_sys.c index 2acea80..1d12498 100644 --- a/drivers/s390/char/sclp_cpi_sys.c +++ b/drivers/s390/char/sclp_cpi_sys.c @@ -416,8 +416,8 @@ static int __init cpi_init(void) int rc; cpi_kset = kset_create_and_add("cpi", NULL, firmware_kobj); - if (!cpi_kset) - return -ENOMEM; + if (IS_ERR(cpi_kset)) + return PTR_ERR(cpi_kset); rc = sysfs_create_group(&cpi_kset->kobj, &cpi_attr_group); if (rc) diff --git a/drivers/s390/char/sclp_ocf.c b/drivers/s390/char/sclp_ocf.c index 2553db0..5cd246a 100644 --- a/drivers/s390/char/sclp_ocf.c +++ b/drivers/s390/char/sclp_ocf.c @@ -129,8 +129,8 @@ static int __init ocf_init(void) INIT_WORK(&sclp_ocf_change_work, sclp_ocf_change_notify); ocf_kset = kset_create_and_add("ocf", NULL, firmware_kobj); - if (!ocf_kset) - return -ENOMEM; + if (IS_ERR(ocf_kset)) + return PTR_ERR(ocf_kset); rc = sysfs_create_group(&ocf_kset->kobj, &ocf_attr_group); if (rc) { -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html