]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
spi: cadence-quadspi: Don't emit error message on allocation error
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 7 Feb 2024 18:40:31 +0000 (19:40 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 8 Feb 2024 11:54:48 +0000 (11:54 +0000)
Drivers are not supposed to emit an error message when a memory
allocation fails, as the kernel is very loud in this case already
anyhow.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/8da90785395664bf17d16428f46e84b95ef5cc3b.1707324794.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-cadence-quadspi.c

index f94e0d370d466e9742261a84a567593b8073f169..eb6cc861b00b213c655e964dfc25b4146e9a41b2 100644 (file)
@@ -1712,10 +1712,9 @@ static int cqspi_probe(struct platform_device *pdev)
        int irq;
 
        host = devm_spi_alloc_host(&pdev->dev, sizeof(*cqspi));
-       if (!host) {
-               dev_err(&pdev->dev, "devm_spi_alloc_host failed\n");
+       if (!host)
                return -ENOMEM;
-       }
+
        host->mode_bits = SPI_RX_QUAD | SPI_RX_DUAL;
        host->mem_ops = &cqspi_mem_ops;
        host->mem_caps = &cqspi_mem_caps;