Skip to contentSkip to conversation

s390/protvirt: fix error return code in uv_info_init()

PATCH In review zhongbaisong 4 participants 5 messages Apr 7, 2021 – Apr 13, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/protvirt: fix error return code in uv_info_init()

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

---
 arch/s390/kernel/uv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/s390/kernel/uv.c +3 -1
index cbfbeab57c3b..370f664580af 100644
@@ -460,8 +460,10 @@ static int __init uv_info_init(void)
 		goto out_kobj;
 
 	uv_query_kset = kset_create_and_add("query", NULL, uv_kobj);
-	if (!uv_query_kset)
+	if (!uv_query_kset) {
+		rc = -ENOMEM;
 		goto out_ind_files;
+	}
 
 	rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group);
 	if (!rc)
#1 lore raw

格式不对,不要用outlook发

Quoted 26 lines · zhongbaisong

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

---
 arch/s390/kernel/uv.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
arch/s390/kernel/uv.c +3 -1
index cbfbeab57c3b..370f664580af 100644
@@ -460,8 +460,10 @@ static int __init uv_info_init(void)
          goto out_kobj;
 
      uv_query_kset = kset_create_and_add("query", NULL, uv_kobj);
-    if (!uv_query_kset)
+    if (!uv_query_kset) {
+        rc = -ENOMEM;
          goto out_ind_files;
+    }
 
      rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group);
      if (!rc)
#2 lore raw
In reply to zhongbaisong
Quoted 14 lines

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

---
 arch/s390/kernel/uv.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
arch/s390/kernel/uv.c +0 -0
index cbfbeab57c3b..370f664580af 100644

arch/s390/kernel/uv.c static int __init uv_info_init(void) · line 466

Quoted 8 lines
arch/s390/kernel/uv.c +3 -1
@@ -460,8 +460,10 @@ static int __init uv_info_init(void)
          goto out_kobj;
 
      uv_query_kset = kset_create_and_add("query", NULL, uv_kobj);
-    if (!uv_query_kset)
+    if (!uv_query_kset) {
+        rc = -ENOMEM;
          goto out_ind_files;
+    }

Your patch is corrupted, please resend with correct format.

Quoted 4 lines
arch/s390/kernel/uv.c +0 -0
      rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group);
      if (!rc)
 
maintainer
#3 lore raw
Quoted 16 lines · weiyongjun (A)
Quoted 16 lines

Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function.

---
 arch/s390/kernel/uv.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)
arch/s390/kernel/uv.c +0 -0
index cbfbeab57c3b..370f664580af 100644
@@ -460,8 +460,10 @@ static int __init uv_info_init(void)
          goto out_kobj;
 
Quoted 8 lines

arch/s390/kernel/uv.c static int __init uv_info_init(void) · line 466

Quoted 6 lines
arch/s390/kernel/uv.c +3 -1
      uv_query_kset = kset_create_and_add("query", NULL, uv_kobj);
-    if (!uv_query_kset)
+    if (!uv_query_kset) {
+        rc = -ENOMEM;
          goto out_ind_files;
+    }

Your patch is corrupted, please resend with correct format.

Fixed up, and applied anyway. Thanks.

#4 lore raw
In reply to zhongbaisong

On Wed, Apr 07, 2021 at 08:38:55PM +0800, zhongbaisong wrote:

                                          ^^^^^^^^^^^^

Heiko Carstens already fixed and applied the patch but it's best to fix this From line so it says "Baisong Zhong" like your Signed-off-by line.

regards,
dan carpenter