Commit 8fc22fa4 authored by Jerome Brunet's avatar Jerome Brunet Committed by Mark Brown

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 34614739
...@@ -118,7 +118,6 @@ static void axg_card_clean_references(struct axg_card *priv) ...@@ -118,7 +118,6 @@ static void axg_card_clean_references(struct axg_card *priv)
if (link->cpus) if (link->cpus)
of_node_put(link->cpus->of_node); of_node_put(link->cpus->of_node);
for_each_link_codecs(link, j, codec) for_each_link_codecs(link, j, codec)
if (codec)
of_node_put(codec->of_node); of_node_put(codec->of_node);
} }
} }
......
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