All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] leds: tca6507: silence an uninitialized variable warning
Date: Thu, 14 Apr 2016 11:12:38 +0000	[thread overview]
Message-ID: <570F7B26.2090202@samsung.com> (raw)
In-Reply-To: <20160414093616.GH16549@mwanda>

Hi Dan,

Thanks for the patch.

Applied to the for-next branch of linux-leds.git.

Thanks,
Jacek Anaszewski

On 04/14/2016 11:36 AM, Dan Carpenter wrote:
> If choose_times() returns -EINVAL that means "c1" and "c2" haven't been
> initialized.  I've added a check for that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index c548ea1..45222a7 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -327,6 +327,8 @@ static void set_times(struct tca6507_chip *tca, int bank)
>   	int result;
>
>   	result = choose_times(tca->bank[bank].ontime, &c1, &c2);
> +	if (result < 0)
> +		return;
>   	dev_dbg(&tca->client->dev,
>   		"Chose on  times %d(%d) %d(%d) for %dms\n",
>   		c1, time_codes[c1],
>
>

WARNING: multiple messages have this Message-ID (diff)
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] leds: tca6507: silence an uninitialized variable warning
Date: Thu, 14 Apr 2016 13:12:38 +0200	[thread overview]
Message-ID: <570F7B26.2090202@samsung.com> (raw)
In-Reply-To: <20160414093616.GH16549@mwanda>

Hi Dan,

Thanks for the patch.

Applied to the for-next branch of linux-leds.git.

Thanks,
Jacek Anaszewski

On 04/14/2016 11:36 AM, Dan Carpenter wrote:
> If choose_times() returns -EINVAL that means "c1" and "c2" haven't been
> initialized.  I've added a check for that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index c548ea1..45222a7 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -327,6 +327,8 @@ static void set_times(struct tca6507_chip *tca, int bank)
>   	int result;
>
>   	result = choose_times(tca->bank[bank].ontime, &c1, &c2);
> +	if (result < 0)
> +		return;
>   	dev_dbg(&tca->client->dev,
>   		"Chose on  times %d(%d) %d(%d) for %dms\n",
>   		c1, time_codes[c1],
>
>

  reply	other threads:[~2016-04-14 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  9:36 [patch] leds: tca6507: silence an uninitialized variable warning Dan Carpenter
2016-04-14  9:36 ` Dan Carpenter
2016-04-14 11:12 ` Jacek Anaszewski [this message]
2016-04-14 11:12   ` Jacek Anaszewski

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=570F7B26.2090202@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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.