Received: by 10.223.164.202 with SMTP id h10csp2589664wrb; Mon, 27 Nov 2017 20:44:21 -0800 (PST) X-Google-Smtp-Source: AGs4zMaD52opjRqGze9RUrO589o1OZVTwO+ofv76CNRNF6MgI8ybqS7z/0GTPjNbpnN7cs9CC1pv X-Received: by 10.101.77.202 with SMTP id q10mr37966425pgt.95.1511844261053; Mon, 27 Nov 2017 20:44:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511844261; cv=none; d=google.com; s=arc-20160816; b=cnDMcXX8xQfGdyGPe0kdbr9HlTMa8CafwziJZ3saYoW5gNSjFp+TZCDTeQdt+ERVvS vTLXrwUvTcEuKbf/HVNWjQ9CVBnkS0UnuGf72cLUTDzqfYHzi7dfvluUt4LQPji1tQg4 ybbnMjvOyG6zA+8Yy4ntoLeM/ESEuZsX/I1fGzn6KUcPBI9Kz/b8R1stbiMP16sbZWFw 0d11Qgo7gKmb+3BVwK65X9C2ilMLUdiTdcFKi67iDnIB6ZR+GjeAGu15vZK5ElXZ7//X r16dVQv2fU4W5AH/JUJVKVaR+gOkWOuW6erjwZm6zwEq/BcF/kA/g96rWeJXHeStpKJh eiTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=oaJFXKsaSvIHmWPtPySr9ZARpDYo6zKjqfrMS4SN5kw=; b=LmT0JaBdNaiNpkYISmOPDqsUwVIrw7UMENTiQ9wGu3f4qvkwhJwmMOsHyeYKYzl4tn un7gBGls7NO7V8iPzh4vaC1L9al/N2SAz39td/vlo+2WOHfm6XDvHt2mZZXvvocUPlwK BUQunDogwjWGWKWWGqV22KjYhjGAsnQIhkK6JlrF5inDl3PJc3v5gmTjVH0pC0q6xiUI BlIFcZXveovqh9xK9MXP+J2A+7FGTPlNXqDIMS/UPeRSlfuVZ16ghS7PBCK7WOYLBqX2 43s8RmVUKonYK/jOmY42bBsNveg/KnWhPJ7mlNr3U/toDbkH7N/mg0iR2RhoEImVZPB7 4mUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=zpiQQjBS; 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 b59si13822483plb.636.2017.11.27.20.44.01; Mon, 27 Nov 2017 20:44:21 -0800 (PST) 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=zpiQQjBS; 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 S1753444AbdK1EnG (ORCPT + 77 others); Mon, 27 Nov 2017 23:43:06 -0500 Received: from mail-by2nam03on0057.outbound.protection.outlook.com ([104.47.42.57]:6208 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751704AbdK1EnD (ORCPT ); Mon, 27 Nov 2017 23:43:03 -0500 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; bh=oaJFXKsaSvIHmWPtPySr9ZARpDYo6zKjqfrMS4SN5kw=; b=zpiQQjBSoq8UdajPXHBbAHqr+fYPMuOjOvQ+FXzz1wQDFwv9x7ASCZlrqe2m1Holki4PCGpM/IuGjSRoC/c/7QjEU5l6LgtDLTKSbLIFrYzCA3a+dVjnmy8Dy8SNbl5MHczq78yxjMQDBlgh+AA40RT96P/v2k1j2Aw6Xrp0fTQ= Received: from MWHPR12CA0029.namprd12.prod.outlook.com (10.172.49.15) by DM5PR1201MB0059.namprd12.prod.outlook.com (10.174.106.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Tue, 28 Nov 2017 04:43:00 +0000 Received: from DM3NAM03FT003.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::207) by MWHPR12CA0029.outlook.office365.com (2603:10b6:301:2::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.260.4 via Frontend Transport; Tue, 28 Nov 2017 04:42:59 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT003.mail.protection.outlook.com (10.152.82.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.239.4 via Frontend Transport; Tue, 28 Nov 2017 04:42:59 +0000 Received: from SATLEXDAG01.amd.com (10.181.40.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 27 Nov 2017 22:42:58 -0600 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 27 Nov 2017 23:42:58 -0500 Received: from LinuxHost.amd.com (10.129.12.246) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.361.1; Tue, 28 Nov 2017 12:42:53 +0800 From: Vijendar Mukunda To: , CC: , , , , , Vijendar Mukunda Subject: [PATCH] ASoC: amd: added error checks in dma driver Date: Tue, 28 Nov 2017 10:13:44 +0530 Message-ID: <1511844224-32404-1-git-send-email-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(39860400002)(2980300002)(428002)(199003)(189002)(68736007)(47776003)(8676002)(4326008)(81156014)(81166006)(39060400002)(77096006)(189998001)(50226002)(356003)(2906002)(7696005)(53416004)(110136005)(97736004)(16586007)(316002)(305945005)(53936002)(51416003)(54906003)(5660300001)(72206003)(50466002)(48376002)(50986999)(101416001)(106466001)(478600001)(36756003)(86362001)(8936002)(6666003)(105586002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR1201MB0059;H:SATLEXCHOV02.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM03FT003;1:CPUPwcDuYXGxzxK2V32tkGLGW+JN+6YLkP/hqqX+NStxsnxWADC9yp/OwzZa+Yc0qpTUAdIr1xxpg3A+lMjacEFG+AE1fjOMJWmv2giqU5gFRMxdBWEaDiwQD0sRlZIj X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6f6cecbd-8f16-4de9-3a39-08d5361a8085 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258);SRVR:DM5PR1201MB0059; X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB0059;3:bY+BG6wvaU4LiMf/f+YSoX3MwHWvEPthfV3ZjYfkqgk9qPTU3sjbw2wjmbDIXqtchWWsmi1j/4osRYPmYcTI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/Tpk+xuSNZT6Y3D9NC6Tm93kxQE86oU59+j5l7Z0Opn1MeI/x5AElQ6tc703XvKhYuBf9Phih3lVu2UXdxQWc73x2FWskojUFWbALd0ahScc+1x5hJV/spYT36UIoBEwI4NGqzc7fKkRTa8tikNPk3tcLJ6tvF2x0goE9J2ZTBoJLhNb/HRiaCKjvkkagvy0IQvN+87pPmaK/oPfJ2GxLV3zTbqAHq+nxRkuQ8NIY5SJ75ZffaygZytHJpixNGFvnGw1m67+MhkcdG6KsSpLN9Xu8I0wVaP9G0ZvHjGDfpAVWWfe6goYKLQgQfdSCMLrSaitKoK/FEeDtaNFYDHRe0bvjvwPxzROpIXxvyxdpxFbgUkEEHb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93003095)(10201501046)(3231022)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011);SRVR:DM5PR1201MB0059;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:DM5PR1201MB0059; X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB0059;4:N0muHW45LCZDIbxycuc2ovpg6mr25Tr9ry4d37qQkDXnZXFG+aFzlBnPuDhaYALLcfkB4Fg7ax5OnYyyaljbw0ll7OuUN92hJBdDuz0+ba9NRnoSSTtkrQP042d3LJsvI10Mg+rkrH7pQTgCfqbgc/MXCSpJ4gerWfkxCc0paGt9r6ziOLOCcRc1R17drVVETGLN9dYCuRNcZIYd45F6Jqw0SuZ2V6tVg/p71n/5Ne07nTvFWmt7N5tWSr/nrEPGCMFSvrvmbRMHYPBoY7WcrebazAsc+jxNx1U1vc1NeRPPze05fwg8zB02iEf5mqQ6 X-Forefront-PRVS: 0505147DDB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM5PR1201MB0059;23:kHR66Tr9natLT3/fhNiX60hAspBXKY1B0VRyJoX?= =?us-ascii?Q?21sjZA2OXsKHy7hWDlwqvs7NN0LEAhpszX5ayodazXgHt0ryOnpSMsocR79l?= =?us-ascii?Q?8ND1txEbAxwrGuvoSo+6MAGy6FNgO+C8mmj5RZb3X3Mcc3a5hmlhcQ//mZuW?= =?us-ascii?Q?W5NIh167WKJaGNlwKyYougATPDtdjnrAykAS7SH1WFmpQ57fjkWivZSWiYkf?= =?us-ascii?Q?2+6A9cZmayjZdJmJxRmFOrWLwLHbbIucVat0LJ4QgO20zU7D92ZefThYUAt7?= =?us-ascii?Q?yqkbRGtCZ3ZLvEN+vziWCa+OmS3VP7tdpku/xGNG/AP1HZ2P7xWdAtOX5BxV?= =?us-ascii?Q?DsT0p16evAWeD8rxF9NvacXCS0jUmUQJOw4LWGchpYlxDh2CA1UPmnDpzoz5?= =?us-ascii?Q?7IQcWbGZ1rzpzjhBj6x8bLGvZacY9omF3vZa3f8OTb6cyoKc5btolUhBqTq2?= =?us-ascii?Q?GplIeqe4Lxll72HvvFvzp60YZsYMMO3OtsIo5sD1ZW5wBKXWNCMa8qwQvZJT?= =?us-ascii?Q?foCoNJn/OMa24GvcWaW6JE1Fgv3SJLPCVvUREawmm1ZFQgTxNxBcelflKEC7?= =?us-ascii?Q?rQGsUK9kXiLKPbQevteYPipCr8qN05/8y1raj2F/IfCoRNhNPnt363j7YB97?= =?us-ascii?Q?dwhicbh/7PyHgbQ0PNNWWTO/mob7aEt102MzHUXemtIlSOttSjVhskKmz5NV?= =?us-ascii?Q?g0tbYjH7YcV3XZiiy/HRijnartm4W+krOKSrTcIWbfFymBdkybGcQEn2opST?= =?us-ascii?Q?DXE7sNNyMaVI4y2mw2nsiWJP0uKotn28OoghrH6heBBIpqdJj0b8RStKicxa?= =?us-ascii?Q?eNdiWI0mbTvsaacelz2u/ayDYqajSU08nCJuK+SUAl/sLkP15kV14yWvY0za?= =?us-ascii?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M7k2vKAd3/yprzTgnY/iJqnVYZ12gcAF9Qxc/Eih4GKcIWhxPKUrDJfnPsMlOzvidJApNoopoajBqR SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR1201MB0059;20:BPrUlSi+h5/k/SdKH+uG/h+MFkQno45nIedHfzyzMMAantWlMoWNb6hqqNzVEZYp2NWbhA8Xkt1QF+mFd/wWvxk2wk/l6PE376O2Qap0hNrRw+2sa5ISpoR5xP+Kqf29qb1UGo9S8LHYpfBCTwHon2a/ELa0LDSRoWmPOv4GnOPvdepB5HLlPeYhn7V6MMfzaTsKKgXaollcZeWHCSJ6rAoMqPQgOsDd9GURsvEy6+sJgft6RNOE1A0mYgJ12Vmk X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2017 04:42:59.3245 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6f6cecbd-8f16-4de9-3a39-08d5361a8085 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0059 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org added additional error checks in acp dma driver Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-pcm-dma.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index fb09578..71ab5b5 100644 --- a/sound/soc/amd/acp-pcm-dma.c +++ b/sound/soc/amd/acp-pcm-dma.c @@ -848,6 +848,9 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct audio_substream_data *rtd = runtime->private_data; + if (!rtd) + return -EINVAL; + buffersize = frames_to_bytes(runtime, runtime->buffer_size); bytescount = acp_get_byte_count(rtd->acp_mmio, substream->stream); @@ -873,6 +876,8 @@ static int acp_dma_prepare(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct audio_substream_data *rtd = runtime->private_data; + if (!rtd) + return -EINVAL; if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { config_acp_dma_channel(rtd->acp_mmio, SYSRAM_TO_ACP_CH_NUM, PLAYBACK_START_DMA_DESCR_CH12, @@ -1082,7 +1087,11 @@ static int acp_audio_probe(struct platform_device *pdev) dev_set_drvdata(&pdev->dev, audio_drv_data); /* Initialize the ACP */ - acp_init(audio_drv_data->acp_mmio, audio_drv_data->asic_type); + status = acp_init(audio_drv_data->acp_mmio, audio_drv_data->asic_type); + if (status) { + dev_err(&pdev->dev, "ACP Init failed\n"); + return status; + } status = snd_soc_register_platform(&pdev->dev, &acp_asoc_platform); if (status != 0) { @@ -1099,9 +1108,14 @@ static int acp_audio_probe(struct platform_device *pdev) static int acp_audio_remove(struct platform_device *pdev) { + int status; struct audio_drv_data *adata = dev_get_drvdata(&pdev->dev); - acp_deinit(adata->acp_mmio); + status = acp_deinit(adata->acp_mmio); + if (status) { + dev_err(&pdev->dev, "ACP Deinit failed\n"); + return status; + } snd_soc_unregister_platform(&pdev->dev); pm_runtime_disable(&pdev->dev); @@ -1111,9 +1125,14 @@ static int acp_audio_remove(struct platform_device *pdev) static int acp_pcm_resume(struct device *dev) { u16 bank; + int status; struct audio_drv_data *adata = dev_get_drvdata(dev); - acp_init(adata->acp_mmio, adata->asic_type); + status = acp_init(adata->acp_mmio, adata->asic_type); + if (status) { + dev_err(dev, "ACP Init failed\n"); + return status; + } if (adata->play_stream && adata->play_stream->runtime) { /* For Stoney, Memory gating is disabled,i.e SRAM Banks @@ -1145,18 +1164,28 @@ static int acp_pcm_resume(struct device *dev) static int acp_pcm_runtime_suspend(struct device *dev) { + int status; struct audio_drv_data *adata = dev_get_drvdata(dev); - acp_deinit(adata->acp_mmio); + status = acp_deinit(adata->acp_mmio); + if (status) { + dev_err(dev, "ACP Deinit failed\n"); + return status; + } acp_reg_write(0, adata->acp_mmio, mmACP_EXTERNAL_INTR_ENB); return 0; } static int acp_pcm_runtime_resume(struct device *dev) { + int status; struct audio_drv_data *adata = dev_get_drvdata(dev); - acp_init(adata->acp_mmio, adata->asic_type); + status = acp_init(adata->acp_mmio, adata->asic_type); + if (status) { + dev_err(dev, "ACP Init failed\n"); + return status; + } acp_reg_write(1, adata->acp_mmio, mmACP_EXTERNAL_INTR_ENB); return 0; } -- 2.7.4 From 1584611082965827837@xxx Mon Nov 20 18:34:51 +0000 2017 X-GM-THRID: 1584611082965827837 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread