diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-14 12:35:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-02 00:04:19 +0300 |
commit | b9c11a2333db7215876eca4ff5a39ee4f94909f2 (patch) | |
tree | e41ae7b5195c199a9e82491be3308ee15fa8dbf1 /drivers/w1/w1.c | |
parent | dd69a18ae71070ffd8805fcdfed6404762eaffa2 (diff) | |
download | linux-b9c11a2333db7215876eca4ff5a39ee4f94909f2.tar.xz |
w1: silence an uninitialized variable warning
If kstrtoint() returns -ERANGE then "tmp" is uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Evgeniy Polaykov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/w1.c')
-rw-r--r-- | drivers/w1/w1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 89a784751738..bb34362e930a 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); |