From: Jerome Brunet Date: Fri, 28 Jun 2019 08:17:08 +0000 (+0200) Subject: ASoC: meson: axg-card: remove useless check on codec X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8fc22fa4b2cd983e4c542d1841b3d2212ad18ed4;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Jerome Brunet Signed-off-by: Mark Brown --- 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); } }