[PATCH v2 5/7] ALSA: rawmidi: Drop redundant stream_open() return check
From: phucduc . bui
Date: Thu Jul 02 2026 - 05:10:10 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
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@xxxxxxxxx>
---
sound/core/rawmidi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 4dfd9d53e6d3..789254a88e53 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -441,9 +441,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
if ((file->f_flags & O_APPEND) && !(file->f_flags & O_NONBLOCK))
return -EINVAL; /* invalid combination */
- err = stream_open(inode, file);
- if (err < 0)
- return err;
+ stream_open(inode, file);
if (maj == snd_major) {
rmidi = snd_lookup_minor_data(iminor(inode),
--
2.43.0