From: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
To: jic23@kernel.org
Cc: nuno.sa@analog.com, Michael.Hennerich@analog.com,
gregkh@linuxfoundation.org, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abdelnasser Hussein <abdelnasserhussein11@gmail.com>,
kernel test robot <lkp@intel.com>
Subject: [PATCH v3 2/2] staging: greybus: audio_codec: remove redundant else-if check
Date: Mon, 3 Aug 2026 16:43:45 +0300 [thread overview]
Message-ID: <20260803134346.6733-4-abdelnasserhussein11@gmail.com> (raw)
In-Reply-To: <20260803134346.6733-1-abdelnasserhussein11@gmail.com>
In gbaudio_module_update(), the widget id is validated earlier in the
function to ensure it is either snd_soc_dapm_aif_in or
snd_soc_dapm_aif_out.
Remove the redundant else-if check for snd_soc_dapm_aif_out. The
remaining branch can only handle snd_soc_dapm_aif_out, which avoids
a compiler warning about a potentially uninitialized variable.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606140347.gGVWDnbi-lkp@intel.com/
Signed-off-by: Abdelnasser Hussein <abdelnasserhussein11@gmail.com>
---
Changes in v3:
- Split from the previous v2 patch to address the uninitialized variable
warning separately.
drivers/staging/greybus/audio_codec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 295222ec0f1a..6daa4e706792 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -322,7 +322,7 @@ int gbaudio_module_update(struct gbaudio_codec_info *codec,
ret = gbaudio_module_enable_tx(codec, module, dai_id);
else
ret = gbaudio_module_disable_tx(module, dai_id);
- } else if (w->id == snd_soc_dapm_aif_out) {
+ } else {
if (enable)
ret = gbaudio_module_enable_rx(codec, module, dai_id);
else
--
2.54.0
next prev parent reply other threads:[~2026-08-03 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 13:43 [PATCH v3 0/2] staging: iio: ad7816: Fix DMA from stack and race conditions Abdelnasser Hussein
2026-08-03 13:43 ` [PATCH v3 1/2] staging: greybus: audio_codec: fix sscanf return value check Abdelnasser Hussein
2026-08-03 15:29 ` Greg KH
2026-08-03 13:43 ` [PATCH v3 1/2] staging: iio: ad7816: serialize ad7816_spi_read() with a mutex Abdelnasser Hussein
2026-08-04 23:59 ` Jonathan Cameron
2026-08-05 12:25 ` nasser
2026-08-03 13:43 ` Abdelnasser Hussein [this message]
2026-08-03 13:43 ` [PATCH v3 2/2] staging: iio: ad7816: avoid DMA from stack in spi_read Abdelnasser Hussein
2026-08-05 0:05 ` Jonathan Cameron
2026-08-05 12:21 ` nasser
-- strict thread matches above, loose matches on Subject: below --
2026-06-14 15:43 [PATCH v3 0/2] staging: greybus: audio: cleanups for gbaudio_module_update Abdelnasser Hussein
2026-06-14 15:43 ` [PATCH v3 2/2] staging: greybus: audio_codec: remove redundant else-if check Abdelnasser Hussein
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=20260803134346.6733-4-abdelnasserhussein11@gmail.com \
--to=abdelnasserhussein11@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=nuno.sa@analog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox