# \[PATCH 25/44\] arm: implement -\>mapping\_error

- From: Russell King - ARM Linux \<linux@armlinux.org.uk\>
- Date: 2017-06-08 14:43:39 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2017/06/5016258
- Thread: https://ratatoskr.run/linux-arm-kernel/2017/06/5016133/t.md

```text
BOn Thu, Jun 08, 2017 at 03:25:50PM +0200, Christoph Hellwig wrote:
> +static int dmabounce_mapping_error(struct device *dev, dma_addr_t dma_addr)
> +{
> +	if (dev->archdata.dmabounce)
> +		return 0;

I'm not convinced that we need this check here:

        dev->archdata.dmabounce = device_info;
        set_dma_ops(dev, &dmabounce_ops);

There shouldn't be any chance of dev->archdata.dmabounce being NULL if
the dmabounce_ops has been set as the current device DMA ops.  So I
think that test can be killed.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
```
