Skip to content
Commit cefa1aaa authored by Dan Carpenter's avatar Dan Carpenter Committed by Miquel Raynal
Browse files

mtd: otp: clean up on error in mtd_otp_nvmem_add()



Smatch complains that these error paths are missing cleanup:

    drivers/mtd/mtdcore.c:983 mtd_otp_nvmem_add()
    warn: missing unwind goto?

This needs to call nvmem_unregister(mtd->otp_user_nvmem) before
returning.

Fixes: 3b270fac ("mtd: otp: Put factory OTP/NVRAM into the entropy pool")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/fe7ef901-9571-4c6e-a40e-449046efe2c6@moroto.mountain
parent a5e393c1
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