ACPI: scan: initialize local variable to avoid garbage being returned
authorColin Ian King <colin.king@canonical.com>
Wed, 9 Jun 2021 17:33:12 +0000 (18:33 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 10 Jun 2021 13:13:26 +0000 (15:13 +0200)
commit23db673d7e5194c8fbbb8c307e23960767305c09
treebbc2608e415fb19567060e2563160fc6c13bf707
parentb83e2b306736cb0d108df791fd4ee39f6d52184f
ACPI: scan: initialize local variable to avoid garbage being returned

In the unlikely event that there are no callback calls made in
acpi_walk_dep_device_list(), local variable ret will be returned as
an uninitialized value.

Clean up static analysis warnings by ensuring ret is initialized.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: a9e10e587304 ("ACPI: scan: Extend acpi_walk_dep_device_list()")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c