From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: sound/hda/common/jack.c:572 snd_hda_jack_add_kctl_mst() error: we previously assumed 'jack->jack' could be null (see line 552)
Date: Fri, 12 Dec 2025 14:47:38 +0800 [thread overview]
Message-ID: <202512121400.bHSVnCSS-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Takashi Iwai <tiwai@suse.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d358e5254674b70f34c847715ca509e46eb81e6f
commit: 05be28fe8521f183f945d052d5019197e5934f0e ALSA: hda: Move common codec driver into sound/hda/common directory
date: 5 months ago
:::::: branch date: 27 hours ago
:::::: commit date: 5 months ago
config: alpha-randconfig-r072-20251212 (https://download.01.org/0day-ci/archive/20251212/202512121400.bHSVnCSS-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202512121400.bHSVnCSS-lkp@intel.com/
smatch warnings:
sound/hda/common/jack.c:572 snd_hda_jack_add_kctl_mst() error: we previously assumed 'jack->jack' could be null (see line 552)
vim +572 sound/hda/common/jack.c
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 527
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 528 /**
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 529 * snd_hda_jack_add_kctl_mst - Add a kctl for the given pin
a11e9b168646cf sound/pci/hda/hda_jack.c Takashi Iwai 2014-10-29 530 * @codec: the HDA codec
a11e9b168646cf sound/pci/hda/hda_jack.c Takashi Iwai 2014-10-29 531 * @nid: pin NID to assign
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 532 * @dev_id : pin device entry id
a11e9b168646cf sound/pci/hda/hda_jack.c Takashi Iwai 2014-10-29 533 * @name: string name for the jack
a11e9b168646cf sound/pci/hda/hda_jack.c Takashi Iwai 2014-10-29 534 * @phantom_jack: flag to deal as a phantom jack
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 535 * @type: jack type bits to be reported, 0 for guessing from pincfg
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 536 * @keymap: optional jack / key mapping
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 537 *
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 538 * This assigns a jack-detection kctl to the given pin. The kcontrol
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 539 * will have the given name and index.
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 540 */
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 541 int snd_hda_jack_add_kctl_mst(struct hda_codec *codec, hda_nid_t nid,
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 542 int dev_id, const char *name, bool phantom_jack,
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 543 int type, const struct hda_jack_keymap *keymap)
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 544 {
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 545 struct hda_jack_tbl *jack;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 546 const struct hda_jack_keymap *map;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 547 int err, state, buttons;
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 548
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 549 jack = snd_hda_jack_tbl_new(codec, nid, dev_id);
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 550 if (!jack)
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 551 return 0;
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 @552 if (jack->jack)
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 553 return 0; /* already created */
80c8bfbe76869b sound/pci/hda/hda_jack.c David Henningsson 2012-06-04 554
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 555 if (!type)
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 556 type = get_input_jack_type(codec, nid);
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 557
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 558 buttons = 0;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 559 if (keymap) {
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 560 for (map = keymap; map->type; map++)
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 561 buttons |= map->type;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 562 }
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 563
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 564 err = snd_jack_new(codec->card, name, type | buttons,
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 565 &jack->jack, true, phantom_jack);
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 566 if (err < 0)
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 567 return err;
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 568
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 569 jack->phantom_jack = !!phantom_jack;
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 570 jack->type = type;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 571 jack->button_state = 0;
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 @572 jack->jack->private_data = jack;
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 573 jack->jack->private_free = hda_free_jack_priv;
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 574 if (keymap) {
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 575 for (map = keymap; map->type; map++)
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 576 snd_jack_set_key(jack->jack, map->type, map->key);
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 577 }
911761c2304327 sound/pci/hda/hda_jack.c Takashi Iwai 2018-11-28 578
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 579 state = snd_hda_jack_detect_mst(codec, nid, dev_id);
31ef22579302ac sound/pci/hda/hda_jack.c Takashi Iwai 2011-12-01 580 snd_jack_report(jack->jack, state ? jack->type : 0);
2ba2dfa1fcc7ce sound/pci/hda/hda_jack.c Jie Yang 2015-04-27 581
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 582 return 0;
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 583 }
5204a05d70d935 sound/pci/hda/hda_jack.c Nikhil Mahale 2019-11-19 584 EXPORT_SYMBOL_GPL(snd_hda_jack_add_kctl_mst);
01a61e12b4602c sound/pci/hda/hda_jack.c Takashi Iwai 2011-10-28 585
:::::: The code at line 572 was first introduced by commit
:::::: 31ef22579302ac42054bebecb528710f46580925 ALSA: hda - Integrate input-jack stuff into kctl-jack
:::::: TO: Takashi Iwai <tiwai@suse.de>
:::::: CC: Takashi Iwai <tiwai@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-12-12 6:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 6:47 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-23 8:32 sound/hda/common/jack.c:572 snd_hda_jack_add_kctl_mst() error: we previously assumed 'jack->jack' could be null (see line 552) kernel test robot
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=202512121400.bHSVnCSS-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.