]> Git Repo - linux.git/commitdiff
dma-mapping: fix inverted logic in dma_supported
authorThierry Reding <[email protected]>
Thu, 20 Dec 2018 16:35:47 +0000 (17:35 +0100)
committerChristoph Hellwig <[email protected]>
Thu, 20 Dec 2018 16:47:55 +0000 (17:47 +0100)
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
kernel/dma/mapping.c

index fc84c81029d904db59b3066cdc205da36972cecd..d7c34d2d1ba5888d0a8c8f6f92f0175f08ac0eb4 100644 (file)
@@ -406,7 +406,7 @@ int dma_supported(struct device *dev, u64 mask)
 
        if (dma_is_direct(ops))
                return dma_direct_supported(dev, mask);
-       if (ops->dma_supported)
+       if (!ops->dma_supported)
                return 1;
        return ops->dma_supported(dev, mask);
 }
This page took 0.051556 seconds and 4 git commands to generate.