dmaengine: sh: shdmac: don't open code of_device_get_match_data()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 1 Mar 2016 16:37:07 +0000 (17:37 +0100)
committerVinod Koul <vinod.koul@intel.com>
Thu, 3 Mar 2016 16:02:45 +0000 (21:32 +0530)
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>
drivers/dma/sh/shdmac.c

index 11707df1a68944979c99579605c0afcd25a41364..80d86402490eef39b9873ad3b5a31a39f790973b 100644 (file)
@@ -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);