Commit f93b646d authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a03b0545
...@@ -222,7 +222,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, ...@@ -222,7 +222,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
char prop[128]; char prop[128];
char *prefix = ""; char *prefix = "";
int ret, single_cpu; int ret, single_cpu;
u32 val;
/* For single DAI link & old style of DT node */ /* For single DAI link & old style of DT node */
if (is_top_level_node) if (is_top_level_node)
...@@ -248,8 +247,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, ...@@ -248,8 +247,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
if (ret < 0) if (ret < 0)
goto dai_link_of_err; goto dai_link_of_err;
if (!of_property_read_u32(node, "mclk-fs", &val)) of_property_read_u32(node, "mclk-fs", &dai_props->mclk_fs);
dai_props->mclk_fs = val;
ret = asoc_simple_card_parse_cpu(cpu, dai_link, ret = asoc_simple_card_parse_cpu(cpu, dai_link,
DAI, CELL, &single_cpu); DAI, CELL, &single_cpu);
...@@ -323,7 +321,6 @@ static int asoc_simple_card_parse_of(struct device_node *node, ...@@ -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 *dev = simple_priv_to_dev(priv);
struct device_node *dai_link; struct device_node *dai_link;
u32 val;
int ret; int ret;
if (!node) if (!node)
...@@ -348,9 +345,7 @@ static int asoc_simple_card_parse_of(struct device_node *node, ...@@ -348,9 +345,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
} }
/* Factor to mclk, used in hw_params() */ /* Factor to mclk, used in hw_params() */
ret = of_property_read_u32(node, PREFIX "mclk-fs", &val); of_property_read_u32(node, PREFIX "mclk-fs", &priv->mclk_fs);
if (ret == 0)
priv->mclk_fs = val;
/* Single/Muti DAI link(s) & New style of DT node */ /* Single/Muti DAI link(s) & New style of DT node */
if (dai_link) { if (dai_link) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment