Skip to content

Commit a36c263

Browse files
committed
ALSA: hda: Drop useless WARN_ON()
Since the commit 97cc2ed ("ALSA: hda - Fix yet another i915 pointer leftover in error path") cleared hdac_acomp pointer, the WARN_ON() non-NULL check in snd_hdac_i915_register_notifier() may give a false-positive warning, as the function gets called no matter whether the component is registered or not. For fixing it, let's get rid of the spurious WARN_ON(). Fixes: 97cc2ed ("ALSA: hda - Fix yet another i915 pointer leftover in error path") Cc: <[email protected]> Reported-by: Kouta Okamoto <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 8da5bbf commit a36c263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/hda/hdac_i915.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ static int hdac_component_master_match(struct device *dev, void *data)
325325
*/
326326
int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *aops)
327327
{
328-
if (WARN_ON(!hdac_acomp))
328+
if (!hdac_acomp)
329329
return -ENODEV;
330330

331331
hdac_acomp->audio_ops = aops;

0 commit comments

Comments
 (0)