aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel/uv.c
diff options
context:
space:
mode:
authorzhongbaisong <[email protected]>2021-04-07 20:38:55 +0800
committerHeiko Carstens <[email protected]>2021-04-12 12:46:41 +0200
commit644975179c00802936c5afc732d9df7f63f735a0 (patch)
tree6033ddb6915c7c6c056a5dd12a49552b7c9eb174 /arch/s390/kernel/uv.c
parent0ee3f73914d93e47bb0146371bc66ca2982970c9 (diff)
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. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Baisong Zhong <[email protected]> Fixes: 37564ed834ac ("s390/uv: add prot virt guest/host indication files") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'arch/s390/kernel/uv.c')
-rw-r--r--arch/s390/kernel/uv.c4
1 files changed, 3 insertions, 1 deletions
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)