mtd: spi-nor: Stop reporting warning message when soft reset is not suported
authorChia-Lin Kao (AceLan) <acelan.kao@canonical.com>
Wed, 29 Nov 2023 06:43:11 +0000 (14:43 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 30 Nov 2023 12:12:40 +0000 (12:12 +0000)
When the software reset command isn't supported, we now stop reporting
the warning message to avoid unnecessary warnings and potential confusion.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off-by: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/20231129064311.272422-2-acelan.kao@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/mtd/spi-nor/core.c

index 87cb2047df80905832e00a331554f811b3aa17ea..96a207751cf2280f8b6fb6b82879a4158e2a038e 100644 (file)
@@ -3237,7 +3237,8 @@ static void spi_nor_soft_reset(struct spi_nor *nor)
 
        ret = spi_mem_exec_op(nor->spimem, &op);
        if (ret) {
-               dev_warn(nor->dev, "Software reset failed: %d\n", ret);
+               if (ret != -EOPNOTSUPP)
+                       dev_warn(nor->dev, "Software reset failed: %d\n", ret);
                return;
        }