Skip to content
Snippets Groups Projects
Commit bcdcb115 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Richard Weinberger
Browse files

ubifs: Fix uninitialized use of err in ubifs_jnl_write_inode()


Clang warns (or errors with CONFIG_WERROR=y):

  fs/ubifs/journal.c:986:20: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized]
    986 |                 ubifs_ro_mode(c, err);
        |                                  ^~~

Set err to -EPERM before the call to ubifs_ro_mode() and reuse it in the
return statement to resolve the warning.

Fixes: 957e1c4e ("ubifs: ubifs_jnl_write_inode: Only check once for the limitation of xattr count")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent fe051552
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment