summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-04-02 10:35:01 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2024-04-02 10:35:04 +0200
commite5929ff7ecc72f277f45fdeebb33a4b53ea64da4 (patch)
treea2eeec11bbdd34ca39c56b63fad023353e689cf8
parent98bfb54c0a0fe643120b9256cd18ac262f5d26e4 (diff)
downloadbarebox-e5929ff7ecc72f277f45fdeebb33a4b53ea64da4.tar.gz
barebox-e5929ff7ecc72f277f45fdeebb33a4b53ea64da4.tar.xz
dma: Fix compiler warning
of_dma_is_coherent() returns an undefined value on unexpected return values of of_dma_get_coherence(): drivers/of/platform.c: In function 'of_dma_is_coherent': drivers/of/platform.c:128:1: warning: control reaches end of non-void function [-Wreturn-type] This cannot be reached so just add a BUG() to silence the compiler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/of/platform.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index e2c252b1ff..918607a518 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -124,6 +124,8 @@ bool of_dma_is_coherent(struct device_node *node)
case DEV_DMA_COHERENCE_DEFAULT:
return IS_ENABLED(CONFIG_ARCH_DMA_DEFAULT_COHERENT);
}
+
+ BUG();
}
EXPORT_SYMBOL_GPL(of_dma_is_coherent);