diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2016-03-01 17:37:07 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-03-03 17:02:45 +0100 |
commit | 6fb5629987239c6a8438fab8fd324b7724e49453 (patch) | |
tree | 67930f43533b87a465c9c44e854e40184b7532e1 /drivers | |
parent | dmaengine: sh: Use ARCH_RENESAS (diff) | |
download | linux-6fb5629987239c6a8438fab8fd324b7724e49453.tar.xz linux-6fb5629987239c6a8438fab8fd324b7724e49453.zip |
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 <wsa+renesas@sang-engineering.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/sh/shdmac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c index 11707df1a689..80d86402490e 100644 --- a/drivers/dma/sh/shdmac.c +++ b/drivers/dma/sh/shdmac.c @@ -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); |