Skip to content

Commit

Permalink
dmaengine: sh: shdmac: don't open code of_device_get_match_data()
Browse files Browse the repository at this point in the history
This change will also make Coverity happy by avoiding a theoretical NULL
pointer dereference; yet another reason is to use the above helper function
to tighten the code and make it more readable.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Wolfram Sang authored and Vinod Koul committed Mar 3, 2016
1 parent 5c229d0 commit 6fb5629
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/sh/shdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ static int sh_dmae_probe(struct platform_device *pdev)
struct resource *chan, *dmars, *errirq_res, *chanirq_res;

if (pdev->dev.of_node)
pdata = of_match_device(sh_dmae_of_match, &pdev->dev)->data;
pdata = of_device_get_match_data(&pdev->dev);
else
pdata = dev_get_platdata(&pdev->dev);

Expand Down

0 comments on commit 6fb5629

Please sign in to comment.