Commit d4e695c0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Hans de Goede

platform/x86: hp-bioscfg: fix error reporting in hp_add_other_attributes()

Return a negative error code instead of returning success.

Fixes: a34fc329 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/138641cc-52c0-41a5-8176-ad01c7e28c67@moroto.mountainReviewed-by: default avatarJorge Lopez <jorge.lopez2@hp.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent b3a8692d
......@@ -630,13 +630,18 @@ static int hp_add_other_attributes(int attr_type)
switch (attr_type) {
case HPWMI_SECURE_PLATFORM_TYPE:
ret = hp_populate_secure_platform_data(attr_name_kobj);
if (ret)
goto err_other_attr_init;
break;
case HPWMI_SURE_START_TYPE:
ret = hp_populate_sure_start_data(attr_name_kobj);
if (ret)
goto err_other_attr_init;
break;
default:
ret = -EINVAL;
goto err_other_attr_init;
}
......
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