Re: [PATCH -next] s390/protvirt: fix error return code in uv_info_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Baisong Zhong <zhongbaisong@xxxxxxxxxx>
---
 arch/s390/kernel/uv.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/s390/kernel/uv.c b/arch/s390/kernel/uv.c
index cbfbeab57c3b..370f664580af 100644
--- a/arch/s390/kernel/uv.c
+++ b/arch/s390/kernel/uv.c
@@ -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.



     rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group);
     if (!rc)




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux