diff options
author | Rob Herring <robh@kernel.org> | 2018-12-13 11:20:36 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-12-13 11:20:36 -0600 |
commit | acc2038738bd6f881e7a277ba14fa7c589fd3058 (patch) | |
tree | fd56524867a9b726b3e5d2cb040ff16b2f2a67a0 /drivers/of/device.c | |
parent | cd1cc0bef46fc8d8f9ebe82d2064d4f4bd5ecf16 (diff) | |
parent | 2c9b0b00af23cdc70d28d82e077dc1d280bcb84a (diff) | |
download | linux-acc2038738bd6f881e7a277ba14fa7c589fd3058.tar.bz2 |
Merge branch 'yaml-bindings-for-v4.21' into dt/next
Diffstat (limited to 'drivers/of/device.c')
-rw-r--r-- | drivers/of/device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/of/device.c b/drivers/of/device.c index 8299f8055da7..3717f2a20d0d 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -149,9 +149,11 @@ int of_dma_configure(struct device *dev, struct device_node *np, bool force_dma) * set by the driver. */ mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1); - dev->bus_dma_mask = mask; dev->coherent_dma_mask &= mask; *dev->dma_mask &= mask; + /* ...but only set bus mask if we found valid dma-ranges earlier */ + if (!ret) + dev->bus_dma_mask = mask; coherent = of_dma_is_coherent(np); dev_dbg(dev, "device is%sdma coherent\n", |