From 866405c5802fecbe30f5b8c27886a0704572b440 Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Thu, 2 Jul 2026 15:44:42 +0700 Subject: [PATCH] ALSA: rawmidi: Drop redundant stream_open() return check 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 Reviewed-by: Cezary Rojewski Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260702084445.519669-6-phucduc.bui@gmail.com --- 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),