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>
This commit is contained in:
Jerome Brunet 2019-06-28 10:17:08 +02:00 committed by Mark Brown
parent 3461473998
commit 8fc22fa4b2
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 2 deletions

View File

@ -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);
}
}