aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2016-03-01 11:39:19 -0500
committerMark Brown <broonie@kernel.org>2016-03-02 06:02:44 -0500
commit6d8044b4ff305238503edca7d75f3ab7410396ba (patch)
tree81a60d200116c9b786e72bacf61fd69c2b8f5ac4
parentb3fc95ad025683180628f6896d1f82d2cf5d0266 (diff)
ASoC: sh: rcar: core: 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: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sh/rcar/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 21e13b3a356f..ba37b0d55b21 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1119,7 +1119,6 @@ static int rsnd_probe(struct platform_device *pdev)
1119 struct rsnd_priv *priv; 1119 struct rsnd_priv *priv;
1120 struct device *dev = &pdev->dev; 1120 struct device *dev = &pdev->dev;
1121 struct rsnd_dai *rdai; 1121 struct rsnd_dai *rdai;
1122 const struct of_device_id *of_id = of_match_device(rsnd_of_match, dev);
1123 int (*probe_func[])(struct rsnd_priv *priv) = { 1122 int (*probe_func[])(struct rsnd_priv *priv) = {
1124 rsnd_gen_probe, 1123 rsnd_gen_probe,
1125 rsnd_dma_probe, 1124 rsnd_dma_probe,
@@ -1145,7 +1144,7 @@ static int rsnd_probe(struct platform_device *pdev)
1145 } 1144 }
1146 1145
1147 priv->pdev = pdev; 1146 priv->pdev = pdev;
1148 priv->flags = (unsigned long)of_id->data; 1147 priv->flags = (unsigned long)of_device_get_match_data(dev);
1149 spin_lock_init(&priv->lock); 1148 spin_lock_init(&priv->lock);
1150 1149
1151 /* 1150 /*