The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ALSA: oss: Drop redundant nonseekable_open() return check
@ 2026-07-02  5:02 phucduc.bui
  0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-07-02  5:02 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai
  Cc: cassiogabrielcontato, Kees Cook, Dan Carpenter, Cen Zhang,
	Len Bao, linux-sound, linux-kernel, bui duc phuc

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/oss/mixer_oss.c | 2 --
 sound/core/oss/pcm_oss.c   | 2 --
 2 files changed, 4 deletions(-)

diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index 591cff800329..6161740f67fa 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -31,8 +31,6 @@ static int snd_mixer_oss_open(struct inode *inode, struct file *file)
 	int err;
 
 	err = nonseekable_open(inode, file);
-	if (err < 0)
-		return err;
 
 	card = snd_lookup_oss_minor_data(iminor(inode),
 					 SNDRV_OSS_DEVICE_TYPE_MIXER);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 9826d9a0be6d..a0bbfa0a7ec8 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -2496,8 +2496,6 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
 	wait_queue_entry_t wait;
 
 	err = nonseekable_open(inode, file);
-	if (err < 0)
-		return err;
 
 	pcm = snd_lookup_oss_minor_data(iminor(inode),
 					SNDRV_OSS_DEVICE_TYPE_PCM);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-02  5:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  5:02 [PATCH] ALSA: oss: Drop redundant nonseekable_open() return check phucduc.bui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox