mtd: maps: physmap: Return -ENOMEM directly when info allocation fails
authorBoris Brezillon <boris.brezillon@bootlin.com>
Fri, 19 Oct 2018 07:49:01 +0000 (09:49 +0200)
committerBoris Brezillon <boris.brezillon@bootlin.com>
Mon, 5 Nov 2018 21:24:10 +0000 (22:24 +0100)
commit7abe5309de76337920f103d9e34ebd42a479533b
treeff88d1e140abdbbfa5e29c7404727acf549fbbc3
parent1e4f42084910067b2d37002afb6d1d1413552e1c
mtd: maps: physmap: Return -ENOMEM directly when info allocation fails

There's no point going to the err_out path since no resources have
been allocated yet, just return -ENOMEM directly.

Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/mtd/maps/physmap.c