Skip to contentSkip to conversation

ALSA: hda: Drop useless WARN_ON()

PATCH New Takashi Iwai 1 participant 1 message Dec 22, 2017 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda: Drop useless WARN_ON()

Since the commit 97cc2ed27e5a ("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 97cc2ed27e5a ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
---
 sound/hda/hdac_i915.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/hda/hdac_i915.c +1 -1
index 038a180d3f81..cbe818eda336 100644
@@ -325,7 +325,7 @@ static int hdac_component_master_match(struct device *dev, void *data)
  */
 int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops *aops)
 {
-	if (WARN_ON(!hdac_acomp))
+	if (!hdac_acomp)
 		return -ENODEV;
 
 	hdac_acomp->audio_ops = aops;
Signature · 1 line
2.15.1