summaryrefslogtreecommitdiffstats
path: root/drivers/of/device.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-12-13 11:20:36 -0600
committerRob Herring <robh@kernel.org>2018-12-13 11:20:36 -0600
commitacc2038738bd6f881e7a277ba14fa7c589fd3058 (patch)
treefd56524867a9b726b3e5d2cb040ff16b2f2a67a0 /drivers/of/device.c
parentcd1cc0bef46fc8d8f9ebe82d2064d4f4bd5ecf16 (diff)
parent2c9b0b00af23cdc70d28d82e077dc1d280bcb84a (diff)
downloadlinux-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.c4
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",