Re: [PATCH] ALSA: control: preserve snd_card_file_add() error code in snd_ctl_open()
From: Bui Duc Phuc
Date: Tue Jul 07 2026 - 22:17:32 EST
Hi Takashi-san,
Thank you for your review!
> > if (err < 0) {
> > - err = -ENODEV;
> > goto __error1;
> > }
>
> Please drop superfluous braces, too, as it becomes a single-line now.
>
I'll update the patch according to your comments.
I'll also expand the commit message to mention that returning the
error directly from snd_card_file_add()
is consistent with the error handling used in functions such as
snd_mixer_oss_open(), snd_hwdep_open(),
snd_pcm_oss_open(), and others.
I'd also like to add one more observation. It seems that checkpatch.pl
did not detect the style issue that
you pointed out:
------------------------
phuc@phuc-desktop:~/work/linux$ ./scripts/checkpatch.pl --strict
0001-ALSA-control-preserve-snd_card_file_add-error-code-i.patch
total: 0 errors, 0 warnings, 0 checks, 7 lines checked
0001-ALSA-control-preserve-snd_card_file_add-error-code-i.patch has no
obvious style problems and is ready for submission.
phuc@phuc-desktop:~/work/linux$
-------------------------
Best regards,
Phuc