Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45ed31be authored by Miquel Raynal's avatar Miquel Raynal Committed by Greg Kroah-Hartman
Browse files

mtd: rawnand: oxnas: Fix the probe error path



[ Upstream commit 154298e2a3f6c9ce1d76cdb48d89fd5b107ea1a3 ]

nand_release() is supposed be called after MTD device registration.
Here, only nand_scan() happened, so use nand_cleanup() instead.

While at it, be consistent and move the function call in the error
path thanks to a goto statement.

Fixes: 66859249 ("mtd: nand: Add OX820 NAND Support")
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/linux-mtd/20200519130035.1883-37-miquel.raynal@bootlin.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 09fc51a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment