mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 23:47:06 +00:00
Commite96a8a3bb6("UBI: Fastmap: Do not add vol if it already exists") introduced a bug by changing the possible error codes returned by add_vol(): - this function no longer returns NULL in case of allocation failure but return ERR_PTR(-ENOMEM) - when a duplicate entry in the volume RB tree is found it returns ERR_PTR(-EEXIST) instead of ERR_PTR(-EINVAL) Fix the tests done on add_vol() return val to match this new behavior. Fixes:e96a8a3bb6("UBI: Fastmap: Do not add vol if it already exists") Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Sheng Yong <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>