Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1983803imu; Fri, 14 Dec 2018 04:04:49 -0800 (PST) X-Google-Smtp-Source: AFSGD/WxWnZ+ul62fEbh/nDr7d92AlAkd/RTWOt3vg4YhlbwFy/wCgmwaLiUsPkbwLRbTfcvvxKl X-Received: by 2002:a63:d208:: with SMTP id a8mr2416039pgg.77.1544789089325; Fri, 14 Dec 2018 04:04:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544789089; cv=none; d=google.com; s=arc-20160816; b=aOuses/ibyJx5r3B5Nfu1OOAbW7y2tunghEaEL2QIO0VeRhDanAttoP0jA+VNjJCHE dpUKfCMkSnJG1CAHDTExCgBPcJBgYoYhSXNSf7Q3iREpa1PQY/tGwah8AGTXaZJ3splr KDRwLLFQAhhgsZ/4X0y13Qb6S/ymr7DdL2CTdXlFMglyfuJgWznjh6KD0/gQaDEqionH KFcWKjC1fpG8m5QLbodIVhvoNldQQxWl6wk/XU970vGlcKHtdsNkq2VQbmLvYqUQC5Tz 0IQwmFTiA7ikA4fCOj+JAvZ9INTUayuuUZh/Nx/TNmo2tXo3kf3ygmL7jvoJdhyYUw5T b6pw== 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=63ADdVG1C53+CdeIwRk9hskNVVekTpr/g0SblOUBb8o=; b=HAWmhekRdsYwEGYNj7BT54m4kmcr9caNTwPWsImYfm1q2exeUliM3S9ylSakbCboRL lW5fNDSO2bNWYT8N+6lqc2BGzwhugkG/ww1FvVadFqc225N6761MmNIjndtxsEZ1eaeA iLu1GwHDHlBfqhtmNg0YzhuCzyb6H1G0aPpLZO/ZUXSHmqqyckq+YEANNDJUSUG/FS9V LYXVpWmKXmMxOEEjMxiE9X6ZKAWh5nRLiXjXX7MpEnpKr/4xztdX71tbQg4u9ByVRVbJ rs5utSYUyIEa+HP/tsZtPkzNumlneAWQJBE49LwXoty9HyWmEkUpZXa3bnn3/665eIrj RzCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=D8xA+YEA; 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 t11si3670444plo.293.2018.12.14.04.04.11; Fri, 14 Dec 2018 04:04:49 -0800 (PST) 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=D8xA+YEA; 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 S1730036AbeLNMC0 (ORCPT + 99 others); Fri, 14 Dec 2018 07:02:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:45286 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730025AbeLNMCX (ORCPT ); Fri, 14 Dec 2018 07:02:23 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 6528C2146F; Fri, 14 Dec 2018 12:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544788942; bh=Ghq8b6xlWC3YQ7cMoSOayWPI1mHvjcB4xFWISwED8ng=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D8xA+YEATRRKRd9ancLODqsfBpQPEoSg/SVpyQBvjcFO/5ynUORVTaMkbeuTRJksv EUsuBXJYSAe6QM7+5j+dhVvN+sJP3qWSYNh9b2EyPiu6ECu1crtcSLpEN3aT/89YzS x1UILIcaft1HtnyYoCagukidK4XbUWkSBGoAmqyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Khoruzhick , Maxime Ripard , Mark Brown , Sasha Levin Subject: [PATCH 4.19 033/142] ASoC: sun8i-codec: fix crash on module removal Date: Fri, 14 Dec 2018 12:58:38 +0100 Message-Id: <20181214115748.375536656@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 278df5e5527b633f4882f1680ad58b62a7c07bfe ] drvdata is actually sun8i_codec, not snd_soc_card, so it crashes when calling snd_soc_card_get_drvdata(). Drop card and scodec vars anyway since we don't need to disable/unprepare clocks - it's already done by calling runtime_suspend() Drop clk_disable_unprepare() calls for the same reason. Fixes: 36c684936fae7 ("ASoC: Add sun8i digital audio codec") Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sunxi/sun8i-codec.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c index fb37dd927e33..bf615fa16dc8 100644 --- a/sound/soc/sunxi/sun8i-codec.c +++ b/sound/soc/sunxi/sun8i-codec.c @@ -589,16 +589,10 @@ static int sun8i_codec_probe(struct platform_device *pdev) static int sun8i_codec_remove(struct platform_device *pdev) { - struct snd_soc_card *card = platform_get_drvdata(pdev); - struct sun8i_codec *scodec = snd_soc_card_get_drvdata(card); - pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) sun8i_codec_runtime_suspend(&pdev->dev); - clk_disable_unprepare(scodec->clk_module); - clk_disable_unprepare(scodec->clk_bus); - return 0; } -- 2.19.1