diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-14 05:35:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-01 17:04:19 -0400 |
commit | b9c11a2333db7215876eca4ff5a39ee4f94909f2 (patch) | |
tree | e41ae7b5195c199a9e82491be3308ee15fa8dbf1 /drivers/w1 | |
parent | dd69a18ae71070ffd8805fcdfed6404762eaffa2 (diff) |
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')
-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, | |||
335 | int tmp; | 335 | int tmp; |
336 | struct w1_master *md = dev_to_w1_master(dev); | 336 | struct w1_master *md = dev_to_w1_master(dev); |
337 | 337 | ||
338 | if (kstrtoint(buf, 0, &tmp) == -EINVAL || tmp < 1) | 338 | if (kstrtoint(buf, 0, &tmp) || tmp < 1) |
339 | return -EINVAL; | 339 | return -EINVAL; |
340 | 340 | ||
341 | mutex_lock(&md->mutex); | 341 | mutex_lock(&md->mutex); |