Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7150935ybi; Mon, 8 Jul 2019 15:40:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKGMd3DUu30apeMxMXCyUdGl5WIi/6/6flnTYH8MawBgWuVKyhYFdz89P5Teg1CdT1lrDp X-Received: by 2002:a63:f817:: with SMTP id n23mr26685387pgh.35.1562625617913; Mon, 08 Jul 2019 15:40:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625617; cv=none; d=google.com; s=arc-20160816; b=UTA1UzqNUHFCLYJByTL86FjIL8Yv+PFv54HYKW5r9H+zwibvw1IZuT37R/gE5QmJGn bBeexVZV96O28EKAf0Dy12JzSllww7HGLjlhOyX/BjdGeRYNSsP/d76/or4c6HdN1Wi9 v/hrO1wT8stGelKIXZCa+iRVGmNOmrUzTKMTaU7sx2IUFzwPeIemDLmYlDWxwjqlklvz ZQb7+FVJPmoToDiNfSOIiLoG8ytvEjpwQKAnYpZJhVhOYHMNikd5UFMqSgwCJjpY0HfL pd9RwJqisvLpiFxvdhRBWOpMJmnHurP9dO466EQZn4iMYVTVPTCp1fMxzctl30ENQNPi /0gw== 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=zR0fmjQqg/hD6tqs2isWoONFkIvGyI1xZdBTxOIB8rM=; b=B33nVBpjwxuTxI2uVqTwMBMe0gF46D6Lj9wDxcq9gRoaVqCnhcQG/7x+6fQsnY+Vdt jkYCedQ+CjrV2gF1FsBBsz9d2l1PO/dIMZ2RTzm9ZIX7jWFbRlEDiAhdwb4xLd5MgAN+ W/wg5HTdFU3DrlZB8IItS/9axnyVjoTJWC4M5rZgmWJhassEFgHvRTUq+14mSz0JQHIS Q7M5iNl9yHQac3DL8QTBP55qeYX62rHOZ6sLs0Kg8m9iBxr3AKIDv+p0/i5eXJHIKoV/ PhME/sL+syO1enPlzFaBbQb+0YASK8Og8Of1/+VmEmvOLgmaWjBKIbeBmqLOglVVvI3T FSuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vs7A3lk4; 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 j67si13406429plb.195.2019.07.08.15.40.03; Mon, 08 Jul 2019 15:40:17 -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=vs7A3lk4; 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 S2390651AbfGHPh1 (ORCPT + 99 others); Mon, 8 Jul 2019 11:37:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:33532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390043AbfGHPcE (ORCPT ); Mon, 8 Jul 2019 11:32:04 -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 7B0A721738; Mon, 8 Jul 2019 15:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599923; bh=wn8tfUQ0QII5ET8ilWg6zjwjOTp8UIfnFEDeH8m0txk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vs7A3lk4wi8FTzyDHBtFZcXkxPGpj40Z2vXccsvlao/McPrTOYY7tiUV/RZhvR2rN a894HZThQpDqCw/G268RPWtQzUBJbYd7jIQ2auvqR7qgHq9PJaaCmaH9cj1I7BJ9OA X3i6dYum3KbdGQcj3zsVmofMgu1Fhtkl4gJchTVM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.1 33/96] ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override Date: Mon, 8 Jul 2019 17:13:05 +0200 Message-Id: <20190708150528.356305528@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150526.234572443@linuxfoundation.org> References: <20190708150526.234572443@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 096701e8131425044d2054a0c210d6ea24ee7386 ] 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: 4506db8043341 ("ASoC: Intel: cht_bsw_nau8824: 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_nau8824.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c index 02c2fa239331..20fae391c75a 100644 --- a/sound/soc/intel/boards/cht_bsw_nau8824.c +++ b/sound/soc/intel/boards/cht_bsw_nau8824.c @@ -257,6 +257,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) snd_soc_card_set_drvdata(&snd_soc_card_cht, drv); /* override plaform name, if required */ + snd_soc_card_cht.dev = &pdev->dev; mach = (&pdev->dev)->platform_data; platform_name = mach->mach_params.platform; @@ -266,7 +267,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; ret_val = devm_snd_soc_register_card(&pdev->dev, &snd_soc_card_cht); if (ret_val) { dev_err(&pdev->dev, -- 2.20.1