]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: ensure zero err is returned on successful return
authorColin Ian King <colin.king@canonical.com>
Fri, 16 Dec 2016 13:32:39 +0000 (13:32 +0000)
committerRichard Weinberger <richard@nod.at>
Tue, 17 Jan 2017 12:57:32 +0000 (13:57 +0100)
commitb1fdcad2e364270147f9ac86449cafb3289abb8e
tree4917e9ccaf6e632bbb63b0048973df8b57edd301
parent8a7f82d5154fa50fe8de6a8e6821650a4241dc9b
ubifs: ensure zero err is returned on successful return

err is no longer being set on a successful return path, causing
a garbage value being returned. Fix this by setting err to zero
for the successful return path.

Found with static analysis by CoverityScan, CID 1389473

Fixes: 001c3e6d85818 ("ubifs: Implement encrypt/decrypt for all IO")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/journal.c