Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6fb56299 authored by Wolfram Sang's avatar Wolfram Sang Committed by Vinod Koul
Browse files

dmaengine: sh: shdmac: don't open code of_device_get_match_data()



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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 5c229d00
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);