[PATCH v3 1/3] i2c: stm32: fix the device used for the DMA map

Andi Shyti andi.shyti at kernel.org
Wed Jul 2 16:57:01 UTC 2025


Hi Clement,

...

> @@ -118,7 +118,7 @@ int stm32_i2c_prep_dma_xfer(struct device *dev, struct stm32_i2c_dma *dma,
>  	dma->dma_len = len;
>  	chan_dev = dma->chan_using->device->dev;
>  
> -	dma->dma_buf = dma_map_single(chan_dev, buf, dma->dma_len,
> +	dma->dma_buf = dma_map_single(dev, buf, dma->dma_len,
>  				      dma->dma_data_dir);
>  	if (dma_mapping_error(chan_dev, dma->dma_buf)) {
			      ^^^^^^^^

this one should be "dev" too, which renders the chan_dev variable
unused.

Thanks,
Andi

>  		dev_err(dev, "DMA mapping failed\n");


More information about the dri-devel mailing list