Commit 64497517 authored by zhongbaisong's avatar zhongbaisong Committed by Heiko Carstens

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarBaisong Zhong <zhongbaisong@huawei.com>
Fixes: 37564ed8 ("s390/uv: add prot virt guest/host indication files")
Link: https://lore.kernel.org/r/2f7d62a4-3e75-b2b4-951b-75ef8ef59d16@huawei.comSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 0ee3f739
...@@ -460,8 +460,10 @@ static int __init uv_info_init(void) ...@@ -460,8 +460,10 @@ static int __init uv_info_init(void)
goto out_kobj; goto out_kobj;
uv_query_kset = kset_create_and_add("query", NULL, uv_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; goto out_ind_files;
}
rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group); rc = sysfs_create_group(&uv_query_kset->kobj, &uv_query_attr_group);
if (!rc) if (!rc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment