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

Commit 0aebdcfa authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Nikhilesh Reddy
Browse files

UBI: fix return error code



We are checking dfs_rootdir for error value or NULL. But in the
conditional ternary operator we returned -ENODEV if dfs_rootdir contains
an error value and returned PTR_ERR(dfs_rootdir) if dfs_rootdir is NULL.
So in the case of dfs_rootdir being NULL we actually assigned 0 to err
and returned it to the caller implying a success.
Lets return -ENODEV when dfs_rootdir is NULL else return
PTR_ERR(dfs_rootdir).

CRs-Fixed: 975289
Change-Id: Ie555805305fd48d79eaf8391dcc5a0215487c9d7
Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Git-commit: 97cb69dd800a471c3ee2467be3826badd9c12883
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarNikhilesh Reddy <reddyn@codeaurora.org>
parent 2db4dd29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment