Commit c2d48cb4 authored by Takashi Iwai's avatar Takashi Iwai Committed by Kleber Sacilotto de Souza

ALSA: hda: Drop useless WARN_ON()

BugLink: http://bugs.launchpad.net/bugs/1745069

commit a36c2638 upstream.

Since the commit 97cc2ed2 ("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: 97cc2ed2 ("ALSA: hda - Fix yet another i915 pointer leftover in error path")
Reported-by: default avatarKouta Okamoto <kouta.okamoto@toshiba.co.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 75078fdb
......@@ -188,7 +188,7 @@ static int hdac_component_master_match_bpo(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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment