platform/x86: hp-bioscfg: Fix uninitialized variable errors
authorJorge Lopez <jorge.lopez2@hp.com>
Mon, 31 Jul 2023 20:31:35 +0000 (15:31 -0500)
committerHans de Goede <hdegoede@redhat.com>
Mon, 7 Aug 2023 11:34:38 +0000 (13:34 +0200)
Fix uninitialized variable errors.

Signed-off-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-3-jorge.lopez2@hp.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c
drivers/platform/x86/hp/hp-bioscfg/int-attributes.c
drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c
drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
drivers/platform/x86/hp/hp-bioscfg/string-attributes.c

index 8e615ccfc9b5178b6cca801a6e9e6f974d57d851..7f77963cd7fa12684da7ae6298479c7ba4f1a492 100644 (file)
@@ -129,7 +129,7 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum
        char *str_value = NULL;
        int value_len;
        u32 size = 0;
-       u32 int_value;
+       u32 int_value = 0;
        int elem = 0;
        int reqs;
        int pos_values;
index 6db2c8ba02a9ab653d21ef5b2f890aee36d4de92..97f88e0ef0cc65633234b78b71c47d7d31fc0270 100644 (file)
@@ -143,7 +143,7 @@ static int hp_populate_integer_elements_from_package(union acpi_object *integer_
        char *str_value = NULL;
        int value_len;
        int ret;
-       u32 int_value;
+       u32 int_value = 0;
        int elem;
        int reqs;
        int eloc;
index 7399986828747b19a09a580bf147267427038bc2..89e67db733ebf8d623e83c2d8e75af71219805a4 100644 (file)
@@ -131,10 +131,10 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord
                                                          int instance_id)
 {
        char *str_value = NULL;
-       int value_len;
+       int value_len = 0;
        int ret;
        u32 size;
-       u32 int_value;
+       u32 int_value = 0;
        int elem;
        int reqs;
        int eloc;
index 3f7b9fe857f1895652e39ab9b668f933518d9557..5e833ea0c5e3d083f2684d9c7669f3a7ad25f10f 100644 (file)
@@ -227,7 +227,7 @@ static int hp_populate_password_elements_from_package(union acpi_object *passwor
        int value_len;
        int ret;
        u32 size;
-       u32 int_value;
+       u32 int_value = 0;
        int elem;
        int reqs;
        int eloc;
index c9e124af170e14573c1a0c7c367869d373dfc7a2..e0ecdfca4def464d04697e793a8d954dac7d49ac 100644 (file)
@@ -133,7 +133,7 @@ static int hp_populate_string_elements_from_package(union acpi_object *string_ob
        char *str_value = NULL;
        int value_len;
        int ret = 0;
-       u32 int_value;
+       u32 int_value = 0;
        int elem;
        int reqs;
        int eloc;