Re: [PATCH 33/69] ALSA: gus: properly handle snd_ctl_add() error

Greg Kroah-Hartman
2021-05-03T17:07:30Z

On Mon, May 03, 2021 at 02:28:25PM +0200, Takashi Iwai wrote:
> On Mon, 03 May 2021 13:57:00 +0200,
> Greg Kroah-Hartman wrote:
> >
> > From: Kurt Manucredo <fuzzybritches0@gmail.com>
> >
> > snd_gus_init_control() does not properly return any possible error that
> > might have happened in a call to snd_ctl_add() so resolve this by
> > propagating the error back up the call change correctly.
> >
> > Cc: Takashi Iwai <tiwai@suse.de>
> > Signed-off-by: Kurt Manucredo <fuzzybritches0@gmail.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> This change doesn't look good, either.
> It results in the bogus error message "version check failed".
>
> If we really want to fix this, it's better to call
> snd_gus_init_control() from snd_gus_initialize() itself while changing
> snd_gus_init_control() to return an error code.
>
> However, this error is really not what we should be bothered too
> much. Even if a creation of control element failed, it's no fatal
> error and nothing really wrong would happen by itself. And, under
> such a situation, the system memory is already too tight and the OS
> would hang up sooner or later (or OOM killer starts genocide).

Thanks for the review, I'll just drop this change as it's not worth it
for this type of "impossible to hit" issue.

thanks,

greg k-h