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]

 



格式不对,不要用outlook发

在 2021/4/7 20:38, zhongbaisong 写道:
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;
+    }

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux