Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {
		if (kstrtoint(buf, 0, &val) != 0)
			count = -EINVAL;
		else
			d->emulate_power_cut = val;
		goto out;
	}