]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spi: stm32: Use NULL instead of 0 for pointer
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Mon, 16 Feb 2026 08:58:17 +0000 (09:58 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 23 Feb 2026 12:17:54 +0000 (12:17 +0000)
Pointers should use NULL instead of explicit '0', as pointed out by
sparse:

  spi-stm32.c:1659:65: warning: Using plain integer as NULL pointer

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260216085816.69888-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32.c

index c9442326782c240c491e019ecc113142693cf842..f4a8a3fb1888025db5c9bfd05d071bb282d71cb5 100644 (file)
@@ -1656,7 +1656,7 @@ static int stm32_spi_transfer_one_dma(struct stm32_spi *spi,
                        ret = stm32_spi_prepare_rx_dma_mdma_chaining(spi, xfer, &rx_dma_conf,
                                                                     &rx_dma_desc, &rx_mdma_desc);
                        if (ret) { /* RX DMA MDMA chaining not possible, fallback to DMA only */
-                               rx_dma_conf.peripheral_config = 0;
+                               rx_dma_conf.peripheral_config = NULL;
                                rx_dma_desc = NULL;
                        }
                }