Skip to content

Commit 6fb5629

Browse files
Wolfram SangVinod Koul
authored andcommitted
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: Wolfram Sang <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
1 parent 5c229d0 commit 6fb5629

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/sh/shdmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ static int sh_dmae_probe(struct platform_device *pdev)
699699
struct resource *chan, *dmars, *errirq_res, *chanirq_res;
700700

701701
if (pdev->dev.of_node)
702-
pdata = of_match_device(sh_dmae_of_match, &pdev->dev)->data;
702+
pdata = of_device_get_match_data(&pdev->dev);
703703
else
704704
pdata = dev_get_platdata(&pdev->dev);
705705

0 commit comments

Comments
 (0)