Commit 24663e72 authored by Dan Carpenter's avatar Dan Carpenter Committed by Richard Weinberger

UBI: Silence an unintialized variable warning

My static checker complains that "val" is uninitialized when kstrtoint()
fails.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent fadb3665
...@@ -352,6 +352,7 @@ static ssize_t dfs_file_write(struct file *file, const char __user *user_buf, ...@@ -352,6 +352,7 @@ static ssize_t dfs_file_write(struct file *file, const char __user *user_buf,
} else if (dent == d->dfs_emulate_power_cut) { } else if (dent == d->dfs_emulate_power_cut) {
if (kstrtoint(buf, 0, &val) != 0) if (kstrtoint(buf, 0, &val) != 0)
count = -EINVAL; count = -EINVAL;
else
d->emulate_power_cut = val; d->emulate_power_cut = val;
goto out; goto out;
} }
......
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