summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2016-08-26 05:05:58 +0200
committerMark Brown <broonie@kernel.org>2016-09-01 22:22:59 +0200
commitf93b646d5124183ab76cb820d5b21a7741726eba (patch)
treea18faf201e03305b17b601f547084ec7004eb3c0
parentASoC: simple-card: call of_node_put() for dai_link (diff)
downloadlinux-f93b646d5124183ab76cb820d5b21a7741726eba.tar.xz
linux-f93b646d5124183ab76cb820d5b21a7741726eba.zip
ASoC: simple-card: tidyup mclk-fs of_property_read_u32() usage
of_property_read_u32() do nothing in error case. Let's tidyup useless usage. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/generic/simple-card.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 3ce8bb6aa4ef..a4a39d41b634 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -222,7 +222,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
char prop[128];
char *prefix = "";
int ret, single_cpu;
- u32 val;
/* For single DAI link & old style of DT node */
if (is_top_level_node)
@@ -248,8 +247,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
if (ret < 0)
goto dai_link_of_err;
- if (!of_property_read_u32(node, "mclk-fs", &val))
- dai_props->mclk_fs = val;
+ of_property_read_u32(node, "mclk-fs", &dai_props->mclk_fs);
ret = asoc_simple_card_parse_cpu(cpu, dai_link,
DAI, CELL, &single_cpu);
@@ -323,7 +321,6 @@ static int asoc_simple_card_parse_of(struct device_node *node,
{
struct device *dev = simple_priv_to_dev(priv);
struct device_node *dai_link;
- u32 val;
int ret;
if (!node)
@@ -348,9 +345,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
}
/* Factor to mclk, used in hw_params() */
- ret = of_property_read_u32(node, PREFIX "mclk-fs", &val);
- if (ret == 0)
- priv->mclk_fs = val;
+ of_property_read_u32(node, PREFIX "mclk-fs", &priv->mclk_fs);
/* Single/Muti DAI link(s) & New style of DT node */
if (dai_link) {