Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10611700ybi; Thu, 25 Jul 2019 02:24:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwY5qpMOjPNFIfTtOVzJ3/Op2uEqxoNZBVLijmpzhG3KYT2mWiM4IZlmlYPrCJJQwEKV80j X-Received: by 2002:a17:90a:7f85:: with SMTP id m5mr91594523pjl.78.1564046643089; Thu, 25 Jul 2019 02:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564046643; cv=none; d=google.com; s=arc-20160816; b=Uecp95EctEE8l+uwUqUivI1c5YSD8+J0Rv3zf/mmeLN7C32QlQGiL4kKOOxRTiQEbA ouBbrn+ljfT0Y5kGPFr8XsOrNkcFaVbgk3Tz9yDQntnuFdOaWBGe0cWak8ynuzWBYMaf E9Fa7QOLLq1g+sY7BwJU4EoXMtHY1w2U4ak0f7gzzGU/gQOKXnQONx7fonnvidaRz50s YIBbz9gAf3pxZGe6F93MtGeHymGWZMbBAvHhThNaina3Pk7p0fzrbRYxFTfBRSSWt+kF eI5YdYF+0I8SItJ/OsupfGWTAcjWhsl/ZqRU2BHCTpeqYFY285quCqoBdpp/rY+ZBSrb YWZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Qs4iVAp3NzvXfOxur4LOT5H6kV00UDEJXQs4NpB8+f8=; b=vWOMVZ9jjwPUtEZ4G66gTgHwIDupSjX4i8bB6NVOyR4vTyKx08Td0yPB/IR9T02SKF WCu9clfPk1w1OepOBm+gdSnhmlePxFxrmCQo96305IO9t0cSSqPIJtLaTXSvrxuEuA0b V7ZbPF+wFE0+L2BZTt2cq8LfiNFyQIeY362uIDaecjSAZ4zN5H0ZIPt9wPo5F14Ae0AP +DZ1W+1iejQahyda74OeReBuUM0KkH9RZOJie+3/YtUrc3mFqvST3h2SOUO25QCVbTZn gwAWlAbbxZus8VEeTmWY+hhmHnNJw1cbkMvppQDzsNawITy38tkqu8eW5IFKEqvkjGN8 6isA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bj6MDSt+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18si14783414plq.311.2019.07.25.02.23.43; Thu, 25 Jul 2019 02:24:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bj6MDSt+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389096AbfGXUav (ORCPT + 99 others); Wed, 24 Jul 2019 16:30:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:52406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388479AbfGXTb1 (ORCPT ); Wed, 24 Jul 2019 15:31:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40C9221951; Wed, 24 Jul 2019 19:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996686; bh=IwmdfIkC2MqFSmTk8Jj9ODAe/YIn4lBeiRKZeC1gaSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bj6MDSt+DP6fD3Op5WbKktvuWvDQRKUaXaatIShNZ4yQPgzSFeqth6EmbvefhOo/7 TrCXG2AEX8eL8ini3txrnff4stg/lsh97xvrlyVN5YpSHjJZo4I4JWJ44L85kJgtD5 SE+U9j2LRwmrwYjoE/Y0Pu1uDq8cr2YhTjMhjGac= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.2 165/413] ASoC: Intel: hdac_hdmi: Set ops to NULL on remove Date: Wed, 24 Jul 2019 21:17:36 +0200 Message-Id: <20190724191746.841668644@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 0f6ff78540bd1b4df1e0f17806b0ce2e1dff0d78 ] When we unload Skylake driver we may end up calling hdac_component_master_unbind(), it uses acomp->audio_ops, which we set in hdmi_codec_probe(), so we need to set it to NULL in hdmi_codec_remove(), otherwise we will dereference no longer existing pointer. Signed-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/hdac_hdmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 1f57126708e7..c9f9820968bb 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1859,6 +1859,12 @@ static void hdmi_codec_remove(struct snd_soc_component *component) { struct hdac_hdmi_priv *hdmi = snd_soc_component_get_drvdata(component); struct hdac_device *hdev = hdmi->hdev; + int ret; + + ret = snd_hdac_acomp_register_notifier(hdev->bus, NULL); + if (ret < 0) + dev_err(&hdev->dev, "notifier unregister failed: err: %d\n", + ret); pm_runtime_disable(&hdev->dev); } -- 2.20.1