Skip to content

Commit

Permalink
dmaengine: of: bail out early if "dmas" property is not present
Browse files Browse the repository at this point in the history
And don't print an error: not configured is not an error.

Reported-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Wolfram Sang authored and Vinod Koul committed Jan 26, 2015
1 parent 640f204 commit c914570
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/dma/of-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c914570

Please sign in to comment.