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

From: Greg Kroah-Hartman
Date: Mon May 03 2021 - 13:07:37 EST


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@xxxxxxxxx>
> >
> > 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@xxxxxxx>
> > Signed-off-by: Kurt Manucredo <fuzzybritches0@xxxxxxxxx>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
>
> 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