Commit b9c11a23 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

w1: silence an uninitialized variable warning

If kstrtoint() returns -ERANGE then "tmp" is uninitialized.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarEvgeniy Polaykov <zbr@ioremap.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd69a18a
...@@ -335,7 +335,7 @@ static ssize_t w1_master_attribute_store_max_slave_count(struct device *dev, ...@@ -335,7 +335,7 @@ static ssize_t w1_master_attribute_store_max_slave_count(struct device *dev,
int tmp; int tmp;
struct w1_master *md = dev_to_w1_master(dev); 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; return -EINVAL;
mutex_lock(&md->mutex); mutex_lock(&md->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment