Skip to content

Commit caf2389

Browse files
Dan Carpenterjwrdegoede
authored andcommitted
platform/x86: intel_skl_int3472: Uninitialized variable in skl_int3472_handle_gpio_resources()
This function returns negative error codes, zero (to indicate that everything has been completed successfully) and one (to indicate that more resources need to be handled still). This code prints an uninitialized error message when the function returns one which potentially leads to an Oops. Fixes: 5de691b ("platform/x86: Add intel_skl_int3472 driver") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Daniel Scally <[email protected]> Link: https://lore.kernel.org/r/YNXTkLNtiTDlFlZa@mwanda Signed-off-by: Hans de Goede <[email protected]>
1 parent 23dcd74 commit caf2389

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/platform/x86/intel/int3472/intel_skl_int3472_discrete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,10 @@ static int skl_int3472_handle_gpio_resources(struct acpi_resource *ares,
286286
int3472->ngpios++;
287287
ACPI_FREE(obj);
288288

289-
if (ret)
289+
if (ret < 0)
290290
return dev_err_probe(int3472->dev, ret, err_msg);
291291

292-
return 0;
292+
return ret;
293293
}
294294

295295
static int skl_int3472_parse_crs(struct int3472_discrete_device *int3472)

0 commit comments

Comments
 (0)