Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1783669imm; Wed, 6 Jun 2018 23:50:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJCERBw6Cowr7qXP2waKVJ0f+g9Cacrfxx0SzcTJ7wFxqagzDlZ8eW7qKR/DJvtMFxg3ax4 X-Received: by 2002:a17:902:7b95:: with SMTP id w21-v6mr711821pll.255.1528354256339; Wed, 06 Jun 2018 23:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528354256; cv=none; d=google.com; s=arc-20160816; b=xp9DBznr/X3vWj3VonWo2MWPghPC+/2GNcTsD91SUvOKPskjIwklJrJUgsfUhW6JZw gsuMDx6zwSW6Wq0n2frbq38znxoycqFAU461AKj+/v+gOprql1EsXwRwshFfP9jFI6hf O8uj5LdaS69ITMwesWQ+JJrAMmKaqh3ZvlwbiMNlEMEiNJUo9BZ23HRKW4xDv5fy/qhj QPc7GfA7VTC66dEJ/7eLq6K4WrGmO4ibUIrEPTy5F/o5b8Gc3kZwArjv515MkNGVg3Ab YE5NedT1mR+pCGc+37tJH4hFflU6w8XHetdfseqM3ycnjgW8fzh4HsiixZNNC3jgUJvp XoOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:from :dkim-signature:arc-authentication-results; bh=irWWIiHhRYRe7/JMl+nHUksh8mL1vFZiN+318G9MwRw=; b=WUN18E7DzUS1kCwAJ8k3QKDw0aa/1TD6R108xEBBC3XlnNqq5Ta5wK3thvK9FsLekV YoAbKwM2t7ubyxtNbHnrTMsxchG/+Vnn/jAwJVzXGYP5X767d2U68xw60CUFJXkLPocy QGhDSD/BXv32IzB/WwLr+tgoHjWCDimP/wN5G+r4DemZoUpPwrhg4eWsytkRPG6v66/1 jVDY+EHNo+SN2o9pyzT27tKpjoXIsb6hE2Xv0cGsp+bOsfcAgi2Uzp62UmC92MPqWxAk uLx60BLTV7tJct/6ZggLXDik3bJk9RxzTc2NmZWTpTJhQ9dLvirQkIR6eJfeuqR9sStQ 6tKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=jvMEjGs4; 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 k13-v6si15963893pfd.97.2018.06.06.23.50.42; Wed, 06 Jun 2018 23:50:56 -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=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=jvMEjGs4; 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 S1752610AbeFGGt2 (ORCPT + 99 others); Thu, 7 Jun 2018 02:49:28 -0400 Received: from mail-co1nam03on0084.outbound.protection.outlook.com ([104.47.40.84]:64096 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751681AbeFGGt0 (ORCPT ); Thu, 7 Jun 2018 02:49:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=irWWIiHhRYRe7/JMl+nHUksh8mL1vFZiN+318G9MwRw=; b=jvMEjGs4VhuWfuqQlSsJnjMUPKaMcLbupvuAG/mQTgZOjB8HCaoAs/hfkoebZ+usOAYt6z7m0k+MUn8/6BDa8QFIDn/+c/TEFGOrgzQn3q1EU36OMuYgGFBtU6BZlhGId5gvgcRNOzZmEpk619AidP9ZXJAT7XVxtoEwdi78WGI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Akshu.Agrawal@amd.com; Received: from akshu-HP-EliteBook-745-G2.amd.com (202.56.249.162) by BL0PR12MB2355.namprd12.prod.outlook.com (2603:10b6:207:4c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.14; Thu, 7 Jun 2018 06:49:14 +0000 From: Akshu Agrawal Cc: djkurtz@chromium.org, akshu.agrawal@amd.com, Alexander.Deucher@amd.com, Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , "Mukunda, Vijendar" , Alex Deucher , Guenter Roeck , alsa-devel@alsa-project.org (moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] ASoC: AMD: Add NULL pointer check Date: Thu, 7 Jun 2018 14:48:43 +0800 Message-Id: <1528354129-5023-1-git-send-email-akshu.agrawal@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.56.249.162] X-ClientProxiedBy: MAXPR0101CA0038.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::24) To BL0PR12MB2355.namprd12.prod.outlook.com (2603:10b6:207:4c::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:BL0PR12MB2355; X-Microsoft-Exchange-Diagnostics: 1;BL0PR12MB2355;3:J+nE/q8tvmfysoYs7U6/HklkZs7Af9uZjTIrVPy8jEfbQjrHRWxyUbsl3bV3wRPKG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v45yD0qlNEgj7HFSy73hVyQgIPKZDPgGOtY3b56ahu/ThDyB863c4fH3gaMmRdgbDz9HPdUSdQ+smgxBcbjuYQ+1CvnHGAxTzFo4R2VJGYwV0Gl160/Tfx2c+B+oFUNRSWmJ4e5eDJwu3GXq3Gkhgmdm/x3HOrbsVUH8IueUqqVA2qCTHjbyBnbstLqfV4BZXGHcKd5ZwkItNLgvy6QqsONTrCnLM2ekYpcgqhs2WFpJH6qryGx+PCz0RCuG+tlInZaXka70BpJYVhh+O+SRSFcj;4:MUd4aCv6Evn3Iq0PwG+JXzosrpcJR5jMh1z+IplVX/6iyS/9q6+BLSpq/sW7YTepy94KGhgEBIR2uT0NF6ASaSDzrtHyfgrGTKLP4pY77y3AFSYaiM3s+9lzrLG/F/gmPhCBO5TnXvHnPE0UiguXBxx0cV6joqg+xfUAVUhHhk1nktKtrWRiuY0WqJ4ph9QmCJ9+Xt7F7dOjll+1yLYl8u93cGjnye1MwyeFn+mIqvrYRhWeVViyEOGWPHxU0NPwqIETv82SvrpplxQM4C4DlwrYp/x2+GsgQi20JhzQYT+RZm5RAEFb9r4RnZ7U6OFU X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016);SRVR:BL0PR12MB2355;BCL:0;PCL:0;RULEID:;SRVR:BL0PR12MB2355; X-Forefront-PRVS: 06968FD8C4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(346002)(396003)(376002)(366004)(39860400002)(39380400002)(189003)(199004)(53936002)(44832011)(54906003)(486006)(386003)(59450400001)(316002)(7736002)(5660300001)(25786009)(86362001)(956004)(2616005)(16586007)(476003)(66066001)(305945005)(6666003)(47776003)(478600001)(106356001)(4326008)(6486002)(39060400002)(109986005)(53416004)(1671002)(105586002)(36756003)(26005)(6116002)(3846002)(52116002)(51416003)(7696005)(97736004)(8676002)(72206003)(48376002)(81166006)(16526019)(186003)(81156014)(68736007)(8936002)(2906002)(50226002)(50466002)(266003);DIR:OUT;SFP:1101;SCL:1;SRVR:BL0PR12MB2355;H:akshu-HP-EliteBook-745-G2.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL0PR12MB2355;23:vzRgk0WwBZRYjt7cWcqGtUlEPoNwnVFyrfWmXbCwQ?= =?us-ascii?Q?t4Tcc8o3PcsQoY8P5VQX/JmGzGTWRudIuNM9bDpuX7wBsD0xf5BQ7AkeYbp4?= =?us-ascii?Q?mmZIEkGlOhwcC5iwlOnzf+v96bFt84TSiTGO17oc1EpPAfA6HZzf1qK/6Qz5?= =?us-ascii?Q?DtU28sfyPoEHV3BbUUJZNBCIfo5msRIEfBpSQvCZ9UtWD/VgeI8TR/ONvB/e?= =?us-ascii?Q?VoLd8t2jF4uXFqL0tNFVNQyw4Geb6ExgflSL91NL1xOqBJ2E8rhUZ4jwPWqy?= =?us-ascii?Q?4R7xPDoClfHMv7zStLrbGd76tLXiskiBSj2XCF8Dz740knHBTtyw2PJfXDxh?= =?us-ascii?Q?M2LMhVH4nMqDkQTOxvhcLNFiItmaTX5ygXQlvtar/lqoLoDDwVLKumBTsaJ0?= =?us-ascii?Q?O2qkERW6pV32Ok191WMAvy3J9ryzywQOcvlHLjXtXanf50IMyHQ8qPlfhop4?= =?us-ascii?Q?henIv78zrX2fojOSVnUTyDw8bYx8p0j77sMX/aAkOnWbAU+CB4neWqSsGRCx?= =?us-ascii?Q?kf/kvqc1G9eo0Pa5F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faTZm36MQAoaPmn6QR9HJXSCQJfmukzLxNrtrtBovNIi12n0H6P7EC X-Microsoft-Exchange-Diagnostics: 1;BL0PR12MB2355;6:qwQBv8JkFsDptWnaFzPDnV66ro0HLM6bTHjvfUICRtltfpEdwHxXDgwSfXonI1+ppE3f3rI6RNA45d0HuTwPoYPiqgGEbC6NpzX5fvX4PI/cXPfnnoVCDiL1ttd44az6KbwolJDSKzov2vm47kAlqhBVEmle+kdaHe7zNeT/IOctER0m86hquVF28T1GX3xEgnB133AqArkiInC6wrnSAPhf7qG7wyvXXDuCDJxIXVceoYbwpxH6ZgwI+jxIESoeOqu/o8ib00gjEklIl8aaAPZ/vKSj2Qid4rX/tDjgXoGxn8BJBAdRtkCQcZEcWAbuKNWyIol40nvEAqo+URWHk6kj+PgPvDsOrGZjlMhlxw+0/uY24Xr50NnPoj2hnn5NQ0y+BKNzvTmiGCvTY9tbVf3lk+Kq27kt6nTegt9oEV9dvszCAucIqGN+qRp0eG5p3rqEvPimMrICaD3kg+FPfQ==;5:wuNto0jHhUkdJ8tZ1ffYMvGRuiav/+EpuIXDHy53W/V4cbNhNzo5Ct5IAlEANtQ/aPGujY0T1YC8dwy1DlIPYqJcTRepugDZW7PYAjJPWLjl95M+qcswyf8a0t685gZEMXCIPiG4fSUsxAVuMVIVa0TYVtGi3hKm6d+9gViQCD4=;24:tGy5q/IO7WywmTqORfb9PSN4aZiSRWZpSrwfiSPNrtFz31Z7jArsraMG4vVi8yZ7dO/I0Vcnqadf2apqY0fCaE0sBPZzGfeNeLGDPyegTJc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BL0PR12MB2355;7:8jFW4NRF+Af/GwIbI1QD4uL9isC+FZKX8q2LMxM3+iQd7dIZhH/d8G2Urgif0Y39I5MUQExQmg62/vgvr4jTc2WdEwcpU6LCDYP49GavQMRCVbCWYiqYHSPLcV3m5Z3AbNQ5RGpaOywd/jsko62TNA6z8sOwGtVCkq2acDTizgo89j6/KHYqNwo9aGmxIMUk2k5n/5sn/0U8PlsjZC20/nvcmlB1wlRKoqCcS7MQ7aULp6it6ygSqTQaYqaeIqzP;20:wed8mHd9E+mXe9FWev0hxkVLrDkfQ5U13//K8+iDJ89H3dUyXyvNKOwxdAHVAxEiy1/aAlY+C8h7kBNLq14MlXziR3k5IlAHxsU2d39K8TmAYW3b+wBlYvfzCrpiYsB3dmBfRRyOjPCHfov0biDnF3x4UvFwP6nc1pSwg2iA4NFZm0GJk05oZXAPICWQIvtQWeKHKzYjU201IRM9njSyyPdQ+HIHvPVDNXvLm5G+C0Rl2wnJY7rNvQKdIQ7dt22Y X-MS-Office365-Filtering-Correlation-Id: 1b565575-d2d0-4c12-410a-08d5cc42cd91 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2018 06:49:14.1824 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1b565575-d2d0-4c12-410a-08d5cc42cd91 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2355 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix crash in those platforms whose machine driver does not expose platform_info. For those platforms we rely on default value and select I2SSP channel. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index 7720384..1458b50 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -773,7 +773,8 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream, if (WARN_ON(!rtd)) return -EINVAL; - rtd->i2s_instance = pinfo->i2s_instance; + if (pinfo) + rtd->i2s_instance = pinfo->i2s_instance; if (adata->asic_type == CHIP_STONEY) { val = acp_reg_read(adata->acp_mmio, mmACP_I2S_16BIT_RESOLUTION_EN); -- 1.9.1