[PATCH] ALSA: oss: Drop redundant nonseekable_open() return check

From: phucduc . bui

Date: Thu Jul 02 2026 - 01:03:09 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

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@xxxxxxxxx>
---
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