]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: mt65xx: Remove the use of dev_err_probe()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 19 Aug 2025 09:20:41 +0000 (17:20 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 19 Aug 2025 12:06:01 +0000 (13:06 +0100)
The dev_err_probe() doesn't do anything when error is '-ENOMEM'. Therefore,
remove the useless call to dev_err_probe(), and just return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250819092044.549464-5-zhao.xichao@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c

index a6032d44771bfdc4b063f91f8aa7ff99e830af30..8a3c00c3af42a74816ac48d5a57972bfdc27aeec 100644 (file)
@@ -1159,7 +1159,7 @@ static int mtk_spi_probe(struct platform_device *pdev)
 
        host = devm_spi_alloc_host(dev, sizeof(*mdata));
        if (!host)
-               return dev_err_probe(dev, -ENOMEM, "failed to alloc spi host\n");
+               return -ENOMEM;
 
        host->auto_runtime_pm = true;
        host->dev.of_node = dev->of_node;