Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Return a negative error code instead of returning success.

Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/138641cc-52c0-41a5-8176-ad01c7e28c67@moroto.mountain
Reviewed-by: Jorge Lopez <jorge.lopez2@hp.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Dan Carpenter and committed by
Hans de Goede
d4e695c0 b3a8692d

+5
+5
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 630 630 switch (attr_type) { 631 631 case HPWMI_SECURE_PLATFORM_TYPE: 632 632 ret = hp_populate_secure_platform_data(attr_name_kobj); 633 + if (ret) 634 + goto err_other_attr_init; 633 635 break; 634 636 635 637 case HPWMI_SURE_START_TYPE: 636 638 ret = hp_populate_sure_start_data(attr_name_kobj); 639 + if (ret) 640 + goto err_other_attr_init; 637 641 break; 638 642 639 643 default: 644 + ret = -EINVAL; 640 645 goto err_other_attr_init; 641 646 } 642 647