diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-08-29 11:27:28 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.co.uk> | 2017-08-29 12:04:14 +0200 |
commit | 4f1e0cb78810afab889fc407ff18c112663a1579 (patch) | |
tree | 2bb496801f8d7865d4a7aa38af89a311142acd70 /drivers/power | |
parent | 1e743997fb9a56cbb34591f5fe88a74c14b8688d (diff) |
power: supply: max17042_battery: Fix compiler warning
Fix drivers/power/supply/max17042_battery.c:1059:6:
warning: 'acpi_id' may be used uninitialized in this function.
No idea why my gcc version did not catch this.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/max17042_battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index 18a44e4ed6ff..5b556a13f517 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -983,7 +983,7 @@ static int max17042_probe(struct i2c_client *client, struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); const struct power_supply_desc *max17042_desc = &max17042_psy_desc; struct power_supply_config psy_cfg = {}; - const struct acpi_device_id *acpi_id; + const struct acpi_device_id *acpi_id = NULL; struct device *dev = &client->dev; struct max17042_chip *chip; int ret; |