From: Dan Carpenter <dan.carpenter@oracle.com>
To: jbrunet@baylibre.com
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ASoC: meson: axg-card: fix null pointer dereference in clean up
Date: Tue, 18 Jun 2019 14:07:11 +0300 [thread overview]
Message-ID: <20190618110710.GA14934@mwanda> (raw)
Hello Jerome Brunet,
The patch 960f428ca0a0: "ASoC: meson: axg-card: fix null pointer
dereference in clean up" from Jun 10, 2019, leads to the following
static checker warning:
sound/soc/meson/axg-card.c:121 axg_card_clean_references()
warn: address of 'link->codecs[j]' is non-NULL
sound/soc/meson/axg-card.c
109 static void axg_card_clean_references(struct axg_card *priv)
110 {
111 struct snd_soc_card *card = &priv->card;
112 struct snd_soc_dai_link *link;
113 struct snd_soc_dai_link_component *codec;
114 int i, j;
115
116 if (card->dai_link) {
117 for_each_card_prelinks(card, i, link) {
118 if (link->cpus)
119 of_node_put(link->cpus->of_node);
120 for_each_link_codecs(link, j, codec)
121 if (codec)
^^^^^
"codec" is the list iterator so it can't possibly be NULL.
122 of_node_put(codec->of_node);
123 }
124 }
125
126 if (card->aux_dev) {
127 for (i = 0; i < card->num_aux_devs; i++)
128 of_node_put(card->aux_dev[i].codec_of_node);
129 }
130
131 kfree(card->dai_link);
132 kfree(priv->link_data);
133 }
regards,
dan carpenter
next reply other threads:[~2019-06-18 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-18 11:07 Dan Carpenter [this message]
2019-06-19 6:58 ` [bug report] ASoC: meson: axg-card: fix null pointer dereference in clean up Jerome Brunet
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=20190618110710.GA14934@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=jbrunet@baylibre.com \
/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: link
Be 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.