public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [patch] w1: silence an uninitialized variable warning
Date: Wed, 27 Apr 2016 14:14:55 +0300	[thread overview]
Message-ID: <514231461755695@web6g.yandex.ru> (raw)
In-Reply-To: <20160414093548.GG16549@mwanda>

Hi Dan

14.04.2016, 12:36, "Dan Carpenter" <dan.carpenter@oracle.com>:
> If kstrtoint() returns -ERANGE then "tmp" is uninitialized.

Looks good to me, please pull it into janitors tree

> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Evgeniy Polaykov <zbr@ioremap.net>

> diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
> index 89a7847..bb34362 100644
> --- a/drivers/w1/w1.c
> +++ b/drivers/w1/w1.c
> @@ -335,7 +335,7 @@ static ssize_t w1_master_attribute_store_max_slave_count(struct device *dev,
>          int tmp;
>          struct w1_master *md = dev_to_w1_master(dev);
>
> - if (kstrtoint(buf, 0, &tmp) == -EINVAL || tmp < 1)
> + if (kstrtoint(buf, 0, &tmp) || tmp < 1)
>                  return -EINVAL;
>
>          mutex_lock(&md->mutex);

      reply	other threads:[~2016-04-27 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  9:35 [patch] w1: silence an uninitialized variable warning Dan Carpenter
2016-04-27 11:14 ` Evgeniy Polyakov [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=514231461755695@web6g.yandex.ru \
    --to=zbr@ioremap.net \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@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