Sudip Mukherjee 97cb69dd80 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).

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
2015-12-16 22:45:04 +01:00
..
2015-11-06 23:26:51 +01:00
2015-12-16 22:45:04 +01:00
2015-04-13 21:05:17 +02:00
2015-10-03 20:09:55 +02:00
2015-11-06 23:26:50 +01:00
2015-09-29 12:47:04 +02:00
2015-10-03 20:09:41 +02:00
2014-11-07 15:14:09 +02:00
2015-03-26 22:47:38 +01:00