From: Cezary Rojewski <cezary.rojewski@intel.com>
To: <phucduc.bui@gmail.com>
Cc: <cassiogabrielcontato@gmail.com>, Kees Cook <kees@kernel.org>,
Mark Brown <broonie@kernel.org>, <linux-sound@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Jaroslav Kysela <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>
Subject: Re: [PATCH] ALSA: control: Drop redundant stream_open() return check
Date: Thu, 2 Jul 2026 11:24:27 +0200 [thread overview]
Message-ID: <aac11007-b2c4-452f-9b5d-798d20f675a8@intel.com> (raw)
In-Reply-To: <20260702044635.29808-1-phucduc.bui@gmail.com>
On 7/2/2026 6:46 AM, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> The previous conversion from nonseekable_open() to stream_open() retained
> the existing error check.
> Since stream_open() always returns 0, remove the dead error handling path.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> sound/core/control.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/sound/core/control.c b/sound/core/control.c
> index 7a8dc506221e..4cfb0be14c92 100644
> --- a/sound/core/control.c
> +++ b/sound/core/control.c
> @@ -56,8 +56,6 @@ static int snd_ctl_open(struct inode *inode, struct file *file)
> int i, err;
>
> err = stream_open(inode, file);
> - if (err < 0)
> - return err;
This is a good catch Phuc! Typically such conversions are discouraged
as things may change in time but in stream_open() case its documentation
clearly states: the function never fails.
While not drop the assignment altogether?
>
> card = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_CONTROL);
> if (!card) {
next prev parent reply other threads:[~2026-07-02 9:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 4:46 [PATCH] ALSA: control: Drop redundant stream_open() return check phucduc.bui
2026-07-02 9:24 ` Cezary Rojewski [this message]
2026-07-02 9:36 ` Bui Duc Phuc
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=aac11007-b2c4-452f-9b5d-798d20f675a8@intel.com \
--to=cezary.rojewski@intel.com \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=tiwai@suse.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