diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2019-06-28 04:17:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-06-28 08:43:32 -0400 |
commit | 8fc22fa4b2cd983e4c542d1841b3d2212ad18ed4 (patch) | |
tree | b42db5aa2d990b86bc95b2ff213fe6c9a8b00f7b /sound/soc/meson | |
parent | 34614739988ad60c3493da66dd856002ee93edf9 (diff) |
ASoC: meson: axg-card: remove useless check on codec
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/meson')
-rw-r--r-- | sound/soc/meson/axg-card.c | 3 |
1 files changed, 1 insertions, 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) | |||
118 | if (link->cpus) | 118 | if (link->cpus) |
119 | of_node_put(link->cpus->of_node); | 119 | of_node_put(link->cpus->of_node); |
120 | for_each_link_codecs(link, j, codec) | 120 | for_each_link_codecs(link, j, codec) |
121 | if (codec) | 121 | of_node_put(codec->of_node); |
122 | of_node_put(codec->of_node); | ||
123 | } | 122 | } |
124 | } | 123 | } |
125 | 124 | ||