projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fadb366
)
UBI: Silence an unintialized variable warning
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 13 Apr 2016 06:41:55 +0000
(09:41 +0300)
committer
Richard Weinberger
<richard@nod.at>
Tue, 24 May 2016 13:24:30 +0000
(15:24 +0200)
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>
drivers/mtd/ubi/debug.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/ubi/debug.c
b/drivers/mtd/ubi/debug.c
index c4cb15a3098c0933f607e4f0cba170e978f910ff..f101a4985a7c39a9891fffd6a6f4f8ff36570ce4 100644
(file)
--- 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,
} 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;
}