summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-07-02 15:44:41 +0700
committerTakashi Iwai <tiwai@suse.de>2026-07-03 13:05:30 +0200
commit290a94d4b9ee8a78ccb4e4a9ee05c59d8907c781 (patch)
tree43a7755e9aae85dfd28fa9fbd351bf1485249069
parent77a5dc04fe7936b021ad7b7ae7c4ba1083d1b68a (diff)
ALSA: pcm: Drop redundant nonseekable_open() return check
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> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260702084445.519669-5-phucduc.bui@gmail.com
-rw-r--r--sound/core/pcm_native.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index d4e04b5088c5..3462cd5275a2 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2873,9 +2873,10 @@ static int snd_pcm_open_file(struct file *file,
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;
+ int err;
+
+ nonseekable_open(inode, file);
+
pcm = snd_lookup_minor_data(iminor(inode),
SNDRV_DEVICE_TYPE_PCM_PLAYBACK);
err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK);
@@ -2887,9 +2888,10 @@ static int snd_pcm_playback_open(struct inode *inode, struct file *file)
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;
+ int err;
+
+ nonseekable_open(inode, file);
+
pcm = snd_lookup_minor_data(iminor(inode),
SNDRV_DEVICE_TYPE_PCM_CAPTURE);
err = snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE);