All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kim, Milo" <milo.kim@ti.com>
To: Colin King <colin.king@canonical.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power_supply: lp8788-charger: initialize boolean 'found'
Date: Mon, 29 Feb 2016 08:22:28 +0900	[thread overview]
Message-ID: <56D38134.7030101@ti.com> (raw)
In-Reply-To: <1456577651-5644-1-git-send-email-colin.king@canonical.com>

On 2/27/2016 9:54 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The boolean 'found' is not initialized and hence garbage. It should
> be initialized as false.
>
> Found with static analysis using CoverityScan
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Milo Kim <milo.kim@ti.com>

Thanks for catching this.

> ---
>   drivers/power/lp8788-charger.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c
> index f5a48fd..7321b72 100644
> --- a/drivers/power/lp8788-charger.c
> +++ b/drivers/power/lp8788-charger.c
> @@ -455,7 +455,7 @@ static void lp8788_charger_event(struct work_struct *work)
>
>   static bool lp8788_find_irq_id(struct lp8788_charger *pchg, int virq, int *id)
>   {
> -	bool found;
> +	bool found = false;
>   	int i;
>
>   	for (i = 0; i < pchg->num_irqs; i++) {
>

WARNING: multiple messages have this Message-ID (diff)
From: "Kim, Milo" <milo.kim@ti.com>
To: Colin King <colin.king@canonical.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>, <linux-pm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] power_supply: lp8788-charger: initialize boolean 'found'
Date: Mon, 29 Feb 2016 08:22:28 +0900	[thread overview]
Message-ID: <56D38134.7030101@ti.com> (raw)
In-Reply-To: <1456577651-5644-1-git-send-email-colin.king@canonical.com>

On 2/27/2016 9:54 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The boolean 'found' is not initialized and hence garbage. It should
> be initialized as false.
>
> Found with static analysis using CoverityScan
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: Milo Kim <milo.kim@ti.com>

Thanks for catching this.

> ---
>   drivers/power/lp8788-charger.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c
> index f5a48fd..7321b72 100644
> --- a/drivers/power/lp8788-charger.c
> +++ b/drivers/power/lp8788-charger.c
> @@ -455,7 +455,7 @@ static void lp8788_charger_event(struct work_struct *work)
>
>   static bool lp8788_find_irq_id(struct lp8788_charger *pchg, int virq, int *id)
>   {
> -	bool found;
> +	bool found = false;
>   	int i;
>
>   	for (i = 0; i < pchg->num_irqs; i++) {
>

  reply	other threads:[~2016-02-28 23:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27 12:54 [PATCH] power_supply: lp8788-charger: initialize boolean 'found' Colin King
2016-02-28 23:22 ` Kim, Milo [this message]
2016-02-28 23:22   ` Kim, Milo
2016-03-03 14:19 ` Sebastian Reichel

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=56D38134.7030101@ti.com \
    --to=milo.kim@ti.com \
    --cc=colin.king@canonical.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@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 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.