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:Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by:
Richard Weinberger <richard@nod.at> Git-commit: 97cb69dd800a471c3ee2467be3826badd9c12883 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Nikhilesh Reddy <reddyn@codeaurora.org>
Loading
Please register or sign in to comment