mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Philipp Zabel <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
640f204bcd
commit
c914570f28
1 changed files with 4 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue