提交 24663e72 编写于 作者: D Dan Carpenter 提交者: Richard Weinberger

UBI: Silence an unintialized variable warning

My static checker complains that "val" is uninitialized when kstrtoint()
fails.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 fadb3665
......@@ -352,7 +352,8 @@ static ssize_t dfs_file_write(struct file *file, const char __user *user_buf,
} else if (dent == d->dfs_emulate_power_cut) {
if (kstrtoint(buf, 0, &val) != 0)
count = -EINVAL;
d->emulate_power_cut = val;
else
d->emulate_power_cut = val;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册