diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/mtd/mtdcore.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 9e18422fdc77..d0c231600f84 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -1015,10 +1015,9 @@ static int mtd_otp_nvmem_add(struct mtd_info *mtd) err: nvmem_unregister(mtd->otp_user_nvmem); /* Don't report error if OTP is not supported. */ - if (err != -EOPNOTSUPP) - return dev_err_probe(dev, err, - "Failed to register OTP NVMEM device\n"); - return 0; + if (err == -EOPNOTSUPP) + return 0; + return dev_err_probe(dev, err, "Failed to register OTP NVMEM device\n"); } /** |