From: Takashi Iwai <tiwai@suse.de>
To: phucduc.bui@gmail.com
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
cassiogabrielcontato@gmail.com, Cen Zhang <zzzccc427@gmail.com>,
Kees Cook <kees@kernel.org>, Mehul Rao <mehulrao@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Mark Brown <broonie@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
eilaimemedsnaimel@gmail.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: pcm: Drop reduntant nonseekable_open() return check
Date: Thu, 02 Jul 2026 09:24:22 +0200 [thread overview]
Message-ID: <87echlam6x.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260702035704.27092-1-phucduc.bui@gmail.com>
On Thu, 02 Jul 2026 05:57:04 +0200,
phucduc.bui@gmail.com wrote:
>
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> nonseekable_open() always returns 0, so the error check is unnecessary.
> Remove the dead error handling path.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> sound/core/pcm_native.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
> index 7dc0060617f1..b245b596d95a 100644
> --- a/sound/core/pcm_native.c
> +++ b/sound/core/pcm_native.c
> @@ -2874,8 +2874,7 @@ static int snd_pcm_playback_open(struct inode *inode, struct file *file)
> {
> struct snd_pcm *pcm;
> int err = nonseekable_open(inode, file);
> - if (err < 0)
> - return err;
> +
We don't have to assign err here, right?
Keeping it looks rather confusing.
> pcm = snd_lookup_minor_data(iminor(inode),
> SNDRV_DEVICE_TYPE_PCM_PLAYBACK);
> err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK);
> @@ -2888,8 +2887,7 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file)
> {
> struct snd_pcm *pcm;
> int err = nonseekable_open(inode, file);
> - if (err < 0)
> - return err;
> +
Ditto.
I see a similar pattern in your other patches. Please try to address
it and resubmit -- at best, as a v2 series of patches.
thanks,
Takashi
next prev parent reply other threads:[~2026-07-02 7:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 3:57 [PATCH] ALSA: pcm: Drop reduntant nonseekable_open() return check phucduc.bui
2026-07-02 7:24 ` Takashi Iwai [this message]
2026-07-02 8:32 ` 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=87echlam6x.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=bigeasy@linutronix.de \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=eilaimemedsnaimel@gmail.com \
--cc=kees@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mehulrao@gmail.com \
--cc=nathan@kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=tiwai@suse.com \
--cc=zzzccc427@gmail.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 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.