From: Wolfram Sang Date: Wed, 14 Jan 2015 14:16:28 +0000 (+0100) Subject: dmaengine: of: bail out early if "dmas" property is not present X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c914570f28552eb4ed6f016ec7b1db292a7c924b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dmaengine: of: bail out early if "dmas" property is not present And don't print an error: not configured is not an error. Reported-by: Philipp Zabel Signed-off-by: Wolfram Sang Acked-by: Geert Uytterhoeven Acked-by: Laurent Pinchart Acked-by: Philipp Zabel Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index d5fbeaa1e7ba..ca31f1b45366 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c @@ -159,6 +159,10 @@ struct dma_chan *of_dma_request_slave_channel(struct device_node *np, return ERR_PTR(-ENODEV); } + /* Silently fail if there is not even the "dmas" property */ + if (!of_find_property(np, "dmas", NULL)) + return ERR_PTR(-ENODEV); + count = of_property_count_strings(np, "dma-names"); if (count < 0) { pr_err("%s: dma-names property of node '%s' missing or empty\n",