From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH 2/9] ASoC: simple-card: tidyup mclk-fs of_property_read_u32() usage
Date: Thu, 25 Aug 2016 01:50:04 +0000 [thread overview]
Message-ID: <87y43l1v6t.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <871t1d39ta.wl%kuninori.morimoto.gx@renesas.com>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
of_property_read_u32() do nothing in error case.
Let's tidyup useless usage.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/generic/simple-card.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 3ce8bb6..a4a39d4 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) {
--
1.9.1
next prev parent reply other threads:[~2016-08-25 1:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 1:48 [PATCH 0/9] ASoC: simple-card: tidyup and synchronize patches Kuninori Morimoto
2016-08-25 1:49 ` [PATCH 1/9] ASoC: simple-card: call of_node_put() for dai_link Kuninori Morimoto
2016-08-25 1:50 ` Kuninori Morimoto [this message]
2016-08-25 1:50 ` [PATCH 3/9] ASoC: simple-card: code sync: tidyup simple_priv_to_xxx() macro Kuninori Morimoto
2016-08-25 1:50 ` [PATCH 4/9] ASoC: simple-card: code sync: use simple_priv_to_props() macro Kuninori Morimoto
2016-08-25 1:51 ` [PATCH 5/9] ASoC: simple-card: is GPL v2 Kuninori Morimoto
2016-08-25 1:51 ` [PATCH 6/9] ASoC: simple-card: code sync: tidyup white line Kuninori Morimoto
2016-08-25 1:52 ` [PATCH 7/9] ASoC: simple-card: code sync: use tag Kuninori Morimoto
2016-08-25 1:52 ` [PATCH 8/9] ASoC: simple-card: code sync: rename num_link to num Kuninori Morimoto
[not found] ` <201608251635.kJNOT64O%fengguang.wu@intel.com>
2016-08-26 2:51 ` Kuninori Morimoto
2016-08-25 1:53 ` [PATCH 9/9] ASoC: simple-card: use kzalloc() for dai_props / dai_link Kuninori Morimoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y43l1v6t.wl%kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=horms@verge.net.au \
--cc=lgirdwood@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).