]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i2c: stm32: Replace dev_err() with dev_err_probe() in probe function
authorEnrico Zanda <e.zanda1@gmail.com>
Tue, 20 May 2025 19:43:56 +0000 (21:43 +0200)
committerAndi Shyti <andi.shyti@kernel.org>
Thu, 28 May 2026 22:04:57 +0000 (00:04 +0200)
This simplifies the code while improving log.

Signed-off-by: Enrico Zanda <e.zanda1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250520194400.341079-7-e.zanda1@gmail.com
drivers/i2c/busses/i2c-stm32.c

index becf8977979f7318ed6c40fd2d4d173771c98788..064e47d6c96fdbe68e23ba1c7066eed327de5a81 100644 (file)
@@ -39,7 +39,7 @@ struct stm32_i2c_dma *stm32_i2c_dma_request(struct device *dev,
        dma_sconfig.direction = DMA_MEM_TO_DEV;
        ret = dmaengine_slave_config(dma->chan_tx, &dma_sconfig);
        if (ret < 0) {
-               dev_err(dev, "can't configure tx channel\n");
+               dev_err_probe(dev, ret, "can't configure tx channel\n");
                goto fail_tx;
        }
 
@@ -60,7 +60,7 @@ struct stm32_i2c_dma *stm32_i2c_dma_request(struct device *dev,
        dma_sconfig.direction = DMA_DEV_TO_MEM;
        ret = dmaengine_slave_config(dma->chan_rx, &dma_sconfig);
        if (ret < 0) {
-               dev_err(dev, "can't configure rx channel\n");
+               dev_err_probe(dev, ret, "can't configure rx channel\n");
                goto fail_rx;
        }