Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp255468ybd; Tue, 25 Jun 2019 20:51:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3xNsRUvF7DiustHSV1ndKuXPifRogoE3FYtdTMAma+Kwt9F9zy1jIwCCrewvJS1WvXGeq X-Received: by 2002:a65:56c5:: with SMTP id w5mr609657pgs.434.1561521083392; Tue, 25 Jun 2019 20:51:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521083; cv=none; d=google.com; s=arc-20160816; b=Aq/OCTBPP6l36TTvYR97PFcA5CTwvC6z1/hv51Wazdx9WuvQnr4lQTEtB4f99y8NXK 6Goqahh+uAjZR9GcpTS1qxGzrGD7pCbfh0vtvS6dPxYCPeNF2C0lumbWYx+GDlA5AVyM MedqVhEgUrEiXlF1sWYyyuI/q7Z4s6N8/WDhY1CIgnhXcn1901ojdYkNQaXrdZ9M/AgU emCNYW8BhlZdqW5qCPdn4542HtcClbb3gkKzzUnnkrtTtDjJCkQL0hz8ORAsPPbV6dyT uDvRZJ3ijJZBw5aFD8tDo5ruQ17l7jFHo1LGzRkxGH5sH3VSxiVJU6PqqkfguaO4zs3t j63Q== 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=jFoPO6Dw/60Awyeo4r6RhBpoCoN6CDVtDeMeW8s/q2c=; b=hPR2P5B2vXSoCvVC+Dzh2udb53vj7BulL3LkXmtTQLa+GRvCLZb/xS4qtFlG31OIqI jqsbQU9HAi4BNTcCTq7K3yFMSNsVm6EicC/k3CmtaqP+6shkD/UA6gh2bRCK/5nOrvog UPgAVS4Dn6E/dy+E9eO6S2QfHmGsAXcJMiiGomSfdFwm2C8adCCW0hf2d4dw0gXsQXWx f6Zcrg+xHJC9FiijcsyXjeruUMbGPw3VcTyCkq5ojW3UQHACkBCV6pov7MngJiOpUVgc GszseMXw+0mTFX9PPpSkmb1R0IUHKwUK9srns+WLk+7nL27w65xzgYp+KDVVYdI7WLl2 LHzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EqUJ9GEa; 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 q5si1986708pll.279.2019.06.25.20.51.07; Tue, 25 Jun 2019 20:51:23 -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=EqUJ9GEa; 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 S1726807AbfFZDuY (ORCPT + 99 others); Tue, 25 Jun 2019 23:50:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:53708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727158AbfFZDmp (ORCPT ); Tue, 25 Jun 2019 23:42:45 -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 E0EAC205ED; Wed, 26 Jun 2019 03:42:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520564; bh=AarvZG2NZ422+D4FObF+VfCAtcqlVfY3f9aW0cHglZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EqUJ9GEaAabHGvakQgZngp2sMeqR0X3sHPALu0je+UcIBqOlMWWsKc1+G7Zox3S1w zH7C/wQyCQCTaGh5crwGJx/1pZlHydUJUvQH6Lh5xfuzqcRQ5bw9N4JhidxQ2QnGfU pF8B4q2mZt7CRn4HHCKIvLXAjEG6O2pKooRbm/34= 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 30/51] ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override Date: Tue, 25 Jun 2019 23:40:46 -0400 Message-Id: <20190626034117.23247-30-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 9bbc799318a34061703f2a980e2b6df7fc6760f0 ] 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: f403906da05cd ("ASoC: Intel: cht_bsw_rt5672: platform name fixup support") Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index 3d5a2b3a06f0..87ce3857376d 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -425,6 +425,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) } /* override plaform name, if required */ + snd_soc_card_cht.dev = &pdev->dev; platform_name = mach->mach_params.platform; ret_val = snd_soc_fixup_dai_links_platform_name(&snd_soc_card_cht, @@ -442,7 +443,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); /* register the soc card */ - snd_soc_card_cht.dev = &pdev->dev; ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); if (ret_val) { dev_err(&pdev->dev, -- 2.20.1