Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp249480ybd; Tue, 25 Jun 2019 20:43:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0ee0ew/T+mf+qnfHHzAZLykazq5q6NO03wrIqEmhlfLdeKp/2TTQtoIpoReAg+vCzbsQj X-Received: by 2002:a17:902:b591:: with SMTP id a17mr2523354pls.96.1561520617947; Tue, 25 Jun 2019 20:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520617; cv=none; d=google.com; s=arc-20160816; b=OttHO18A9Lnmc82xsQIwvtF5CqT1swbhULtVr4ZG/yNHTC2boPJle8cVdAKY/n8vc6 KXdJonDcIIQwjjn8cYagosR604keWdTq6t1Xc+64qJxPDVK7Cp3EYiti2zVh5N6RdAse BxkemvQAxjlQw7ebGRUFVyoGHd2veXEyeF5eKFFmGMiuVhByUCTQaQnrmWPVV39HkXcS gj73VE7+7GzOsoe7bdMc8ZLpCC3bpsAd+Vin7C9ggEVhuUNpDh8h1Xzux5v2fnrc2y+v k+Q4LAQ2y8tN1KJXs1F40hh9qOGi09SGwF+XPDwNR0TNg9Pzc0TSNOdxbE5C9Jd0sKux cxrw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=X39NTQeVBiLO7pIFLuowfqbwD9tZfnupfCQrLRo9bKw=; b=ygCNwb3OyCmDgnRpNw7SM7+NH1iTsvna78qgtCqHqOtbXNEwQQLLjFPdmHoN8bwWJQ 1y7DQJWKR6JJuuo5oWCLnFLRlnGXf2MdKKt5OTvDslLEXzctKm2WRK2eYuMm8X4W+CZ/ /fz+qIvsqNsUMZyg8sTfCr2pzZ1VaZogaINMOd9tLGWhl/MZqWkwFoMW63St25OVaejC fjxJMad7vBWW4qwNesqeFczHbEE3tG42bt85Qc7bquCAd5GWwYM1qXotjMFi9k1vx4kH NcoLSFvJfcLe2v+Gbl+2Fu2ov/Wxcb05fM868smbClVcmANt1Favp70ReB7RZ2nPXDSm UmyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TtbwxWcs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si2023051pll.324.2019.06.25.20.43.22; Tue, 25 Jun 2019 20:43:37 -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=TtbwxWcs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727151AbfFZDml (ORCPT + 99 others); Tue, 25 Jun 2019 23:42:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:53578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbfFZDmi (ORCPT ); Tue, 25 Jun 2019 23:42:38 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FCD3205ED; Wed, 26 Jun 2019 03:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520558; bh=ZnJ0IcjJ+Fv98iuJ4+4bztcwRxmltk6g0GA8+oy+Olc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TtbwxWcsw0c7W6rD0TEoVTwDgscDKQ0XG5/szf2BUzGX02L3nymqlTX+EaplV13uF gdlx9x41RN55lVL1YfqqKYKNW/SL3zsrfBeURd4Q2R9U0QTRZ0PyciuI9zGYfJ4jq3 jHCZ0l7uwGW6cLza1PevnSldXtB1bxmVIPNhJSIM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 5.1 28/51] ASoC: Intel: bytcht_es8316: fix kernel oops with platform_name override Date: Tue, 25 Jun 2019 23:40:44 -0400 Message-Id: <20190626034117.23247-28-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart [ Upstream commit 79136a016add1acb690fe8d96be50dd22a143d26 ] The platform override code uses devm_ functions to allocate memory for the new name but the card device is not initialized. Fix by moving the init earlier. Fixes: e4bc6b1195f64 ("ASoC: Intel: bytcht_es8316: platform name fixup support") Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/bytcht_es8316.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index d2a7e6ba11ae..1c686f83220a 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -471,6 +471,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) } /* override plaform name, if required */ + byt_cht_es8316_card.dev = dev; platform_name = mach->mach_params.platform; ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_es8316_card, @@ -538,7 +539,6 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) (quirk & BYT_CHT_ES8316_MONO_SPEAKER) ? "mono" : "stereo", mic_name[BYT_CHT_ES8316_MAP(quirk)]); byt_cht_es8316_card.long_name = long_name; - byt_cht_es8316_card.dev = dev; snd_soc_card_set_drvdata(&byt_cht_es8316_card, priv); ret = devm_snd_soc_register_card(dev, &byt_cht_es8316_card); -- 2.20.1