From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [morimoto-linux:fw-cleanup-2021-02-01-v1 47/105] include/sound/soc.h:1270 snd_soc_fixup_dai_links_platform_name() error: potentially dereferencing uninitialized 'dai_link'.
Date: Mon, 01 Feb 2021 13:54:03 +0800 [thread overview]
Message-ID: <202102011359.46cTV3Lh-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3625 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
tree: https://github.com/morimoto/linux fw-cleanup-2021-02-01-v1
head: 5b4245224e7512af00a891f6bb91474bea0a361e
commit: c7ccad9772573920328d9c930197cef3b9e492f4 [47/105] ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name()
:::::: branch date: 87 minutes ago
:::::: commit date: 10 days ago
config: x86_64-randconfig-m001-20210201 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
include/sound/soc.h:1270 snd_soc_fixup_dai_links_platform_name() error: potentially dereferencing uninitialized 'dai_link'.
vim +/dai_link +1270 include/sound/soc.h
a47cbe72632366 Mark Brown 2008-07-23 1257
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1258 static inline
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1259 int snd_soc_fixup_dai_links_platform_name(struct snd_soc_card *card,
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1260 const char *platform_name)
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1261 {
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1262 struct snd_soc_dai_link *dai_link;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1263 const char *name;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1264 int i;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1265
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1266 if (!platform_name) /* nothing to do */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1267 return 0;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1268
c7ccad97725739 Kuninori Morimoto 2020-12-15 1269 /* only single platform is supported for now */
c7ccad97725739 Kuninori Morimoto 2020-12-15 @1270 if (dai_link->num_platforms != 1) {
c7ccad97725739 Kuninori Morimoto 2020-12-15 1271 dev_err(card->dev, "only single platform is supported for now\n");
c7ccad97725739 Kuninori Morimoto 2020-12-15 1272 return -EINVAL;
c7ccad97725739 Kuninori Morimoto 2020-12-15 1273 }
c7ccad97725739 Kuninori Morimoto 2020-12-15 1274
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1275 /* set platform name for each dailink */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1276 for_each_card_prelinks(card, i, dai_link) {
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1277 name = devm_kstrdup(card->dev, platform_name, GFP_KERNEL);
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1278 if (!name)
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1279 return -ENOMEM;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1280
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1281 if (!dai_link->platforms)
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1282 return -EINVAL;
adb76b5b9c4740 Kuninori Morimoto 2019-06-06 1283
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1284 /* only single platform is supported for now */
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1285 dai_link->platforms->name = name;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1286 }
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1287
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1288 return 0;
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1289 }
cb50358b83846e Pierre-Louis Bossart 2019-01-25 1290
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38320 bytes --]
next reply other threads:[~2021-02-01 5:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-01 5:54 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-02 7:17 [morimoto-linux:fw-cleanup-2021-02-01-v1 47/105] include/sound/soc.h:1270 snd_soc_fixup_dai_links_platform_name() error: potentially dereferencing uninitialized 'dai_link' Dan Carpenter
2021-02-02 7:17 ` Dan Carpenter
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=202102011359.46cTV3Lh-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.