From: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-pm@vger.kernel.org
Subject: Re: [PATCH] power: supply: max17042_battery: Fix compiler warning
Date: Tue, 29 Aug 2017 12:13:37 +0200 [thread overview]
Message-ID: <20170829101337.7spvvle4zcvpaija@earth> (raw)
In-Reply-To: <20170829092728.15039-1-hdegoede@redhat.com>
[-- 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 --]
prev parent reply other threads:[~2017-08-29 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-29 9:27 [PATCH] power: supply: max17042_battery: Fix compiler warning Hans de Goede
2017-08-29 10:13 ` Sebastian Reichel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170829101337.7spvvle4zcvpaija@earth \
--to=sebastian.reichel@collabora.co.uk \
--cc=hdegoede@redhat.com \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).