Re: [PATCH] ALSA: hda/hdmi: Remove some dead code
From: Takashi Iwai
Date: Tue Apr 18 2023 - 02:01:36 EST
On Mon, 17 Apr 2023 07:41:48 +0200,
Christophe JAILLET wrote:
>
> These snd_BUG_ON() can never trigger, so just remove them to save a few
> LoC.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> This patch is speculative. Maybe the other "if"s should be removed and the
> error code returned instead.
>
> I chose to remove these ones and the corresponding error code, because it
> seems that it is already handled this way in hdmi_pcm_open().
>
> I don't know the code enough, so it is only my guess.
>
> Review with care :)
A sanity check is merely a sanity check, and we haven't got report
hitting this, so this should be fine. Let's cross fingers.
thanks,
Takashi