mtd: nand: pxa3xx: Free memory on error
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 1 Aug 2025 10:39:13 +0000 (11:39 +0100)
committerMichael Trimarchi <michael@amarulasolutions.com>
Sun, 3 Aug 2025 08:20:16 +0000 (10:20 +0200)
commit42ef9a0b7f26ccd7b657e9686a406ee83b8bd08d
tree0d79a395615c66c446d32eb475d249d34799e041
parentae5711f881100f856ead1e76832c32b92dba93c7
mtd: nand: pxa3xx: Free memory on error

In pxa3xx_nand_probe_dt if the function detects an error after
allocating memory that memory is not freed before exit. Add the
appropriate free.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: MIchael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/nand/raw/pxa3xx_nand.c