All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: supply: max17042_battery: Fix compiler warning
@ 2017-08-29  9:27 Hans de Goede
  2017-08-29 10:13 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2017-08-29  9:27 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, linux-pm

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>
---
 drivers/power/supply/max17042_battery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.13.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] power: supply: max17042_battery: Fix compiler warning
  2017-08-29  9:27 [PATCH] power: supply: max17042_battery: Fix compiler warning Hans de Goede
@ 2017-08-29 10:13 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2017-08-29 10:13 UTC (permalink / raw)
  To: Hans de Goede; +Cc: linux-pm

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

Hi,

On Tue, Aug 29, 2017 at 11:27:28AM +0200, Hans de Goede wrote:
> 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>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/max17042_battery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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;
> -- 
> 2.13.4
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-29 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29  9:27 [PATCH] power: supply: max17042_battery: Fix compiler warning Hans de Goede
2017-08-29 10:13 ` Sebastian Reichel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.