From: Dan Carpenter <error27@gmail.com>
To: "Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>
Cc: "lkp@intel.com" <lkp@intel.com>,
"oe-kbuild-all@lists.linux.dev" <oe-kbuild-all@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Brown <broonie@kernel.org>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
"oe-kbuild@lists.linux.dev" <oe-kbuild@lists.linux.dev>
Subject: Re: sound/soc/codecs/tac5xx2-sdw.c:984 tac5xx2_jack_init() warn: missing error code 'ret'
Date: Wed, 29 Jul 2026 13:06:58 +0300 [thread overview]
Message-ID: <amnQwkLaHtbkH2Me@stanley.mountain> (raw)
In-Reply-To: <8a416f4caf9d41168a38e04140486aef@ti.com>
On Wed, Jul 29, 2026 at 09:56:57AM +0000, Holalu Yogendra, Niranjan wrote:
> > On 11:16-20260729, Dan Carpenter wrote:
> > Subject: sound/soc/codecs/tac5xx2-sdw.c:984 tac5xx2_jack_init() warn: missing error code 'ret's
> >
> > smatch warnings:
> > sound/soc/codecs/tac5xx2-sdw.c:984 tac5xx2_jack_init() warn: missing error
> > code 'ret'
> >
> > vim +/ret +984 sound/soc/codecs/tac5xx2-sdw.c
> >
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 979 static int tac5xx2_jack_init(struct tac5xx2_prv *tac_dev)
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 980 {
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 981 int ret = 0;
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 982
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 983 if (!tac_dev->hs_jack)
> > 38c89fededd5a9 Niranjan H Y 2026-05-05 @984 goto disable_interrupts;
> >
> > Is this supposed to be an error path? tac_dev->hs_jack can't be NULL
> > in real life.
>
> We added this as defensive strategy in case someone calls like this
> snd_soc_component_set_jack(component, NULL, NULL);
Should it return zero or an error code? I feel like it should
return an error code since it disables interrupts which
pretty much stops the driver.
regards,
dan carpenter
next prev parent reply other threads:[~2026-07-29 10:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 5:45 sound/soc/codecs/tac5xx2-sdw.c:984 tac5xx2_jack_init() warn: missing error code 'ret' Dan Carpenter
2026-07-29 9:56 ` Holalu Yogendra, Niranjan
2026-07-29 10:06 ` Dan Carpenter [this message]
2026-07-29 10:38 ` Holalu Yogendra, Niranjan
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=amnQwkLaHtbkH2Me@stanley.mountain \
--to=error27@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=niranjan.hy@ti.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--cc=pierre-louis.bossart@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox