From: Jerome Brunet <jbrunet@baylibre.com> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Kevin Hilman <khilman@baylibre.com> Cc: Jerome Brunet <jbrunet@baylibre.com>, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Dan Carpenter <dan.carpenter@oracle.com> Subject: [PATCH] ASoC: meson: axg-card: remove useless check on codec Date: Fri, 28 Jun 2019 10:17:08 +0200 [thread overview] Message-ID: <20190628081708.22039-1-jbrunet@baylibre.com> (raw) While checking cpus before dereferencing the pointer is required, it is not necessary for codecs. 'codec' can't possibly be NULL in the loop Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- sound/soc/meson/axg-card.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 70bb0cbad233..14a8321744da 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -118,8 +118,7 @@ static void axg_card_clean_references(struct axg_card *priv) if (link->cpus) of_node_put(link->cpus->of_node); for_each_link_codecs(link, j, codec) - if (codec) - of_node_put(codec->of_node); + of_node_put(codec->of_node); } } -- 2.21.0
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Brunet <jbrunet@baylibre.com> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Kevin Hilman <khilman@baylibre.com> Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Dan Carpenter <dan.carpenter@oracle.com>, Jerome Brunet <jbrunet@baylibre.com> Subject: [PATCH] ASoC: meson: axg-card: remove useless check on codec Date: Fri, 28 Jun 2019 10:17:08 +0200 [thread overview] Message-ID: <20190628081708.22039-1-jbrunet@baylibre.com> (raw) While checking cpus before dereferencing the pointer is required, it is not necessary for codecs. 'codec' can't possibly be NULL in the loop Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- sound/soc/meson/axg-card.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 70bb0cbad233..14a8321744da 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -118,8 +118,7 @@ static void axg_card_clean_references(struct axg_card *priv) if (link->cpus) of_node_put(link->cpus->of_node); for_each_link_codecs(link, j, codec) - if (codec) - of_node_put(codec->of_node); + of_node_put(codec->of_node); } } -- 2.21.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2019-06-28 8:17 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-28 8:17 Jerome Brunet [this message] 2019-06-28 8:17 ` [PATCH] ASoC: meson: axg-card: remove useless check on codec Jerome Brunet 2019-06-28 16:56 ` Applied "ASoC: meson: axg-card: remove useless check on codec" to the asoc tree Mark Brown 2019-06-28 16:56 ` Mark Brown 2019-06-28 16:56 ` Mark Brown
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=20190628081708.22039-1-jbrunet@baylibre.com \ --to=jbrunet@baylibre.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=dan.carpenter@oracle.com \ --cc=devicetree@vger.kernel.org \ --cc=khilman@baylibre.com \ --cc=lgirdwood@gmail.com \ --cc=linux-amlogic@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.