diff options
author | Thierry Reding <treding@nvidia.com> | 2018-12-20 11:35:47 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-20 11:47:55 -0500 |
commit | 8b1cce9f5832a8eda17d37a3c49fb7dd2d650f46 (patch) | |
tree | d73a821b8def58fd58a913bbbb297cceca343bd1 | |
parent | 06d4dd2f2ce1cdb625f77c0676d5af6ba310c01d (diff) |
dma-mapping: fix inverted logic in dma_supported
The cleanup in commit 356da6d0cde3 ("dma-mapping: bypass indirect calls
for dma-direct") accidentally inverted the logic in the check for the
presence of a ->dma_supported() callback. Switch this back to the way it
was to prevent a crash on boot.
Fixes: 356da6d0cde3 ("dma-mapping: bypass indirect calls for dma-direct")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | kernel/dma/mapping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/dma/mapping.c b/kernel/dma/mapping.c index fc84c81029d9..d7c34d2d1ba5 100644 --- a/kernel/dma/mapping.c +++ b/kernel/dma/mapping.c | |||
@@ -406,7 +406,7 @@ int dma_supported(struct device *dev, u64 mask) | |||
406 | 406 | ||
407 | if (dma_is_direct(ops)) | 407 | if (dma_is_direct(ops)) |
408 | return dma_direct_supported(dev, mask); | 408 | return dma_direct_supported(dev, mask); |
409 | if (ops->dma_supported) | 409 | if (!ops->dma_supported) |
410 | return 1; | 410 | return 1; |
411 | return ops->dma_supported(dev, mask); | 411 | return ops->dma_supported(dev, mask); |
412 | } | 412 | } |