Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp249419ybd; Tue, 25 Jun 2019 20:43:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwliAvEoCSbXgxc8BTS7VYlHFMPLtYWShISwv/6mdnfCRN3vFtwTFidKezBh1K7W124IeUv X-Received: by 2002:a17:902:a504:: with SMTP id s4mr2532684plq.117.1561520613147; Tue, 25 Jun 2019 20:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561520613; cv=none; d=google.com; s=arc-20160816; b=IE2XFOW4cAqGm0GGb3OAoU9BPIcgiZMUsCrtcT/m1hwFo5WqAk88V7sRsF4mjYglOk u2DT4Cn5O4z6NNFI0zjAa2gZMMhDx86tPUqLtMSSSz4m+kmRtKnyLEzpTwxAXIJKfVnQ py8CPFBS2Hznm05721N+LEg6nsE8D3ny+wlhV7HsZukqxiffm5VG9rSdG5WpaPweDd24 RcsBJieimWc69jnKRB8UuBF5sQcD08oq3dMG8gCW5uaJ6MdHV+7FR9M5OnyRQ40lQGv2 iBlMNj6uMTQ4WTn4bke2EV+R5wIdWR9q7kCuN1vWvlBhCb4b7lUk6Ty7i1jI66zKl6lf gigA== 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=26BtPZMPBS0WVLFB7qPStkfN1v1cRqu6yGnvHTkT/Nw=; b=zjCz2V1hja3agpCvg8fLa6kU6B2G5B9ye+1J6tI+STxa59aVsGaJiWD2q0PyN7V/fI afY3Bi0BYry8HI/qoCAaBS7NTNXy8QCi7iV2uTSkdh3YspwhNxtn4Vm6xw8OXsBI/aLg 7ktlo+PznqQBk+lio3sn7jXYKu6CimHIH+OVoat+V3rTNxwWonLehc7CeUc08Rf64PyL CFP02a9YH1FncnckNXsnWN6QKSr21BqiOgy6ZeexlSurBG4y2sCYr156qMs+847HSNjQ Z7ftEuKuqywP8XzW5tSgcaqOTUaxwPsMq//C7dgNA9Qr+/7fEwAtLLULQQfwaTfBTyyB /gZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rpe4Px4i; 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 l67si2105621plb.370.2019.06.25.20.43.17; Tue, 25 Jun 2019 20:43:33 -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=rpe4Px4i; 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 S1727138AbfFZDmi (ORCPT + 99 others); Tue, 25 Jun 2019 23:42:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:53496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727126AbfFZDmf (ORCPT ); Tue, 25 Jun 2019 23:42:35 -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 CBDB3205ED; Wed, 26 Jun 2019 03:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520555; bh=Gv3hw/k7mmbRNXuMW8lE0Q2BLmdqFxvvc2E8zs/sBrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rpe4Px4iRVatT7w58jGL3Jdpj/5VLKik5nORv3SLKYJ97UMnsakvo9PiVXr79jLWZ l9OK/9hajCrR/UDCV4LTc0fLFksiP0uWS1X4wAyYqDFUFT5VHDlLVN9UkSp28LzkGR 4bYpC4KC95jisrT6MKIBLwwf2eWxUBAFpuhtG2Vc= 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 27/51] ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override Date: Tue, 25 Jun 2019 23:40:43 -0400 Message-Id: <20190626034117.23247-27-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 fb54555134b9b17835545e4d096b5550c27eed64 ] 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: 7e7e24d7c7ff0 ("ASoC: Intel: cht_bsw_max98090_ti: 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_max98090_ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c index c0e0844f75b9..572e336ae0f9 100644 --- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c +++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c @@ -454,6 +454,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) } /* override plaform name, if required */ + snd_soc_card_cht.dev = &pdev->dev; mach = (&pdev->dev)->platform_data; platform_name = mach->mach_params.platform; @@ -463,7 +464,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev) return ret_val; /* register the soc card */ - snd_soc_card_cht.dev = &pdev->dev; snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); if (drv->quirks & QUIRK_PMC_PLT_CLK_0) -- 2.20.1