diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-13 02:41:55 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-05-24 09:24:30 -0400 |
commit | 24663e7281b8fbfaae22467ec2625e2bffe07815 (patch) | |
tree | b24aafa5dd282b12df53541acdace2e69405522d /drivers/mtd/ubi/debug.c | |
parent | fadb3665bad96be8f696e4899ee0f618536d54c7 (diff) |
UBI: Silence an unintialized variable warning
My static checker complains that "val" is uninitialized when kstrtoint()
fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/debug.c')
-rw-r--r-- | drivers/mtd/ubi/debug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c index c4cb15a3098c..f101a4985a7c 100644 --- a/drivers/mtd/ubi/debug.c +++ b/drivers/mtd/ubi/debug.c | |||
@@ -352,7 +352,8 @@ static ssize_t dfs_file_write(struct file *file, const char __user *user_buf, | |||
352 | } else if (dent == d->dfs_emulate_power_cut) { | 352 | } else if (dent == d->dfs_emulate_power_cut) { |
353 | if (kstrtoint(buf, 0, &val) != 0) | 353 | if (kstrtoint(buf, 0, &val) != 0) |
354 | count = -EINVAL; | 354 | count = -EINVAL; |
355 | d->emulate_power_cut = val; | 355 | else |
356 | d->emulate_power_cut = val; | ||
356 | goto out; | 357 | goto out; |
357 | } | 358 | } |
358 | 359 | ||