• S
    UBI: fix return error code · 97cb69dd
    Sudip Mukherjee 提交于
    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: NSudip Mukherjee <sudip@vectorindia.org>
    Signed-off-by: NRichard Weinberger <richard@nod.at>
    97cb69dd
debug.c 15.3 KB