Received: by 10.223.164.202 with SMTP id h10csp250872wrb; Wed, 29 Nov 2017 21:30:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMZLn3uDR2arTpC/j5vQ8OCfB1G87qNlo7P/E6bwK86U3V3tp5uHVdl0FNgZI41AOkWHjU9t X-Received: by 10.99.120.73 with SMTP id t70mr1278417pgc.402.1512019819245; Wed, 29 Nov 2017 21:30:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512019819; cv=none; d=google.com; s=arc-20160816; b=pqRQx9BMlMsIYT7WnewVmOQEs/ucNcls7oPQsCCVKTUjPGm6UTVTTKV43Y+56QCVvE g+Ni6FhAzPZn8FCT7/V4AhVoYb1sA8GhE4LyrvZMLcax6eTg7zwSe6B5BH2SOD4ENlIW umQGCLFqReGpjD6iQ0M8L0DMpTSqXAH9o9AN+UHV7A0u6StaDNfIKGEV82wdu3WzNXX2 Sz+DOgxDquhfum7DxOoQ0BDEuY2z4IxWp+68nq3tQw8ddHc/J6igGj3fDuj2yUnO+/K/ RpeiPxEtwS5EBdtO0diFyA1PQDweHn3f2UYFIXA6Hblof6u14aTfwsCoSV4O9SrJQ/J4 Q4NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=IfgyqWqQS7hiFd5ndKGlAk/ToFitg/Ffsl4x8BXfRS8=; b=KYE1CuqTBQOsRHQ1DGkH8zyuhzfhrkqtcZoIqYawYWt9p2DbYlz9DtNVZ5jEmCJL91 7m+B48pSd1Iuz1ohRxng4LnyUdK2gK66PbRy6XvF6sKmnH5j74p20+X9UWNejg/ZnhwC +qrY4yVrmIBorkeeDxVdFS1HC3SvWby3TxlT+pY6tj+vTSY4dquo/jT3opIRsR2idvr1 z7pZlqwqgP0HaEFwVy/x2qW5FJPK1U3hGqD4VnluAimIlX9Hk4xKMAH9fkLz59muI2WO 7VUo7SvlEJ/jtqRRHwcoUjv0GmbXB4jt6aCyZW+3N41IQpFpEztDEaX24LonHm6b9KSg MRTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=gMsQI8xh; 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 f89si1337700plb.636.2017.11.29.21.30.04; Wed, 29 Nov 2017 21:30:19 -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=gMsQI8xh; 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 S1750918AbdK3F2o (ORCPT + 99 others); Thu, 30 Nov 2017 00:28:44 -0500 Received: from mail-sn1nam02on0082.outbound.protection.outlook.com ([104.47.36.82]:30852 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750742AbdK3F2l (ORCPT ); Thu, 30 Nov 2017 00:28:41 -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=IfgyqWqQS7hiFd5ndKGlAk/ToFitg/Ffsl4x8BXfRS8=; b=gMsQI8xhNEyaRXJq9lvJ65Oippuw5CT36DH86xWeI50rX5JhwiEfJ+jTuDbwX5dyrO8zGy84DslDso8AoAqJaF5MQQQI9+TonSY+f7x3K5Hh4S3f7B/5sPy7QrgEozuUwmMnNP4zznIAtQ0dpYObvvv/DZL1UUo5opXXD2gjE7Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Vijendar.Mukunda@amd.com; Received: from [10.129.12.246] (125.21.194.1) by MWHPR12MB1680.namprd12.prod.outlook.com (10.172.56.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Thu, 30 Nov 2017 05:28:37 +0000 Subject: Re: [PATCH] ASoC: amd: added error checks in dma driver To: Mark Brown Cc: alsa-devel@alsa-project.org, tiwai@suse.de, lgirdwood@gmail.com, perex@perex.cz, Alexander.Deucher@amd.com, linux-kernel@vger.kernel.org References: <1511844224-32404-1-git-send-email-Vijendar.Mukunda@amd.com> <20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk> From: "Mukunda,Vijendar" Message-ID: Date: Thu, 30 Nov 2017 10:59:17 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [125.21.194.1] X-ClientProxiedBy: PN1PR0101CA0048.INDPRD01.PROD.OUTLOOK.COM (10.174.150.34) To MWHPR12MB1680.namprd12.prod.outlook.com (10.172.56.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 62f503c5-ca40-452d-50db-08d537b3366c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603281);SRVR:MWHPR12MB1680; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12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0fPu+tURWCPK7pPi9bTRDisxbz3kOMtXl/fmRO9geJRUh8NN5qIKQaoSd1KK4AJtZdFJjIKV05U1fqOuRdqvJ2Fu7zcSfiKy1hHlhroSqRWYlLk6zXcJcsvgTR92AgLdvEbH2BOdOJTSlyNyUcgSQ8bmbXxW1ezes8HNGkFvwwRi1OwfMyTRCucvjsAc9GE+uRtlxafiOGIQtndjo+/7zOO5qWI6Zp3ILZibs9Q55EP5DKU00n6a72ODgjwzV7OR4Gt0vzvyaPp55Pdoq0nXIgMBwXVpsaziSPQlPGHTeEAmmz6nYobLMOz0jTi/iFaGsGB8QDzI/WaBwAMeJC58Mjnbx3ekUPFUo;4:1KLgTt4odPbQDXsr/AciXpUwGbTWUrJCF/LBtBc+fDGGbjZs4CEEstKdSt6Kv9M3LdYAmUqzU2JLeSuyYiSQvAegMdrEsQ53tyc+c2EoN+rrr3lUsxAJET+/sNRX8i8ZFGc4nZBSHuYzemq4fGOyT5hJfCUAca/IU6jJg50IYs1f/b5yCyAIjWhFuVpRNUpRklv5r6JWV3rVsISDYQWzy44RsFMwmdtBxsQRCgYQo6GUvKP6CqbDtdzVx4xQ9gRBPsLMN+Z7P9qJtrBo0DLGsg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3231022)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(201708071742011);SRVR:MWHPR12MB1680;BCL:0;PCL:0;RULEID:(100000803101)(100110400095);SRVR:MWHPR12MB1680; X-Forefront-PRVS: 05079D8470 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(6049001)(39860400002)(376002)(366004)(346002)(199003)(24454002)(189002)(478600001)(5660300001)(90366009)(65826007)(23746002)(77096006)(6486002)(6916009)(64126003)(2950100002)(229853002)(31686004)(81156014)(50466002)(305945005)(97736004)(7736002)(16526018)(81166006)(72206003)(101416001)(4326008)(53936002)(16576012)(67846002)(6246003)(25786009)(52116002)(316002)(39060400002)(189998001)(68736007)(33646002)(6116002)(105586002)(3846002)(86362001)(6666003)(36756003)(65956001)(66066001)(65806001)(230700001)(58126008)(8676002)(106356001)(8936002)(2906002)(31696002)(47776003)(54356010)(76176010)(50986010)(83506002);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1680;H:[10.129.12.246];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;MWHPR12MB1680;23:URgnzDegNB2G3kcXC3ilTpTELVsULKLKjuoOL?= =?Windows-1252?Q?a+QCm0RnfAvpYo5qLhSs6J+eUBV/A5uL90LsoZKYLLQ6swlRv5Bgfhib?= =?Windows-1252?Q?w//cO6k/4XG7aJYBTUS+Zf1AmP4ph5vX6ouGD0f2YwT04OC1VAbVlgB4?= =?Windows-1252?Q?QdJebB5hgJW0ykFp86qYi+6mQ5MOWe4mUoMT5qmAafxZxlsoQ4GdeJPS?= =?Windows-1252?Q?i3uKgbyMi+sAvNvTnsARiiktUnYuFNg3njjUdM8a2aHkcHRDRW9sKpNs?= =?Windows-1252?Q?QSpip/5/II4PqBrgfR2kTfbKch4Hp/pWmTH2cb+QxpZ8HjndAhVJDuw2?= =?Windows-1252?Q?YEhveil4uovyr/wtq9Wk2atTixj5BkJY9kaPZpXX036aP1yKYxx49e4a?= =?Windows-1252?Q?sgAiWEDfVUHZ7Ya4T8yLrvIizsqSDy/83PJb2k7hFgh9LD0nRz01ytBh?= =?Windows-1252?Q?c/oW5udZranbgQAFVsh91URBLoPJvxwIDkSIi/25Jejs/QAe9qlyn/0i?= =?Windows-1252?Q?BJTCEWhh8dgo5JO8dUp3MycUulEXedYhW3fQbMU79NUsSsAX3j9P8ptu?= =?Windows-1252?Q?FGRYZJ9ikuyOx2J2eS5Gh4jsfYwjZETYXTNnmZltZvWloUGqrcA0tBXM?= =?Windows-1252?Q?us11/Kt0j/zg6xh9ihB44jrfXOQzMYeHQQdEqzaOTXiRlj1r6vhmDf1P?= =?Windows-1252?Q?tomWg6OYEzTGp0r8Fvh6zabY7mJhtO6+2wYlDMCeJ4oByvZY6SJ1icr4?= =?Windows-1252?Q?gCaghj9K1wfIUviQ5keCgxFt3X2fUnT2mz5dEW9i2tkQ5Ufp50jbZP1S?= =?Windows-1252?Q?aIn2U0DeSURbNcIn1Pri9s9a3UO6tdUGXsvEGMxKSbt4/hoWl0bZDUIX?= =?Windows-1252?Q?N5RNFz3gsZRV5pWwVyPrYzctLjDXrn89eMy+YxVHSlGuUAQgh92Ydc9Q?= =?Windows-1252?Q?cjgZ7vUtQRYQIwEYDSk9az3IdeF9dihSWmk3xz7UTOWRakikt/5w3SkQ?= =?Windows-1252?Q?Nw1WNNrUL0HHgZOcI2VS68V/1nBrotjrUXCIf3JucdGRqnOQtvXUXwaR?= =?Windows-1252?Q?dkoxDbeP1zCn6Ok7DX7zL934tCETJbee9tyUx0A3jpmOltDXNCnPwiFf?= =?Windows-1252?Q?Du69NT2L7O3ArOKaYcdIKOaiYWsq/+wYzrJCRct98kOVG5UZXLZk6m2C?= =?Windows-1252?Q?cLGfAIQ7ByAXO6BwaAFVtjlUkNY60Zw4ddlZ6jl5Vj2kJAxiHnYSo3YQ?= =?Windows-1252?Q?ngTA81WacAeQkXxBh/dQxe1v0kj8iGLHrvELtRKsn/hCuiTsVeKTUVRY?= =?Windows-1252?Q?Mb8J4zVl+4a32b4n5e+kucpE21d5pWBGnvDum91UM8ZLGp7fBTDt7jVT?= =?Windows-1252?Q?8D0fAC6Ka3G/oC2sxGHNlyP8kKjtdk2ZX332R5UKcJOLzONVX077tWwf?= =?Windows-1252?Q?wwlsUx8PXONCocBRa2oI/oBz+LBLTJwz1mb8nCpi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ticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1680;20:o/lo14/5HOtU+v38GUWRv7sboAGXRfWVJ56hNaXXq0BpqojJZdDemIKuGUhVbtYrixPlJ+MiUsXyiRwUBL3RHsni32WqunrhyMpFpUXTCcjwiN9KUuD150qNzaeSdB7rbibIgclTfIdc13qtWtaOVaHr2d3H3nateaqhHgTGkr9MkLh7blEEoDSaYQaD0L6YxfSCIrtO8QfJGKNOgjbvDPIIN4GF8w6GfzxdHoWUUGNFgE+EOhdFplfyv1V4xSD0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2017 05:28:37.0628 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62f503c5-ca40-452d-50db-08d537b3366c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1680 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 28 November 2017 05:22 PM, Mark Brown wrote: > On Tue, Nov 28, 2017 at 10:13:44AM +0530, Vijendar Mukunda wrote: > >> - 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; >> + } >> > Better to print the error code to help people see what went wrong. > >> 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); > Remove operations can't meaningfully fail, better to just log the error > and carry on. Will prepare a patch based on your review comments and post it as V2 version. From 1585310660988146132@xxx Tue Nov 28 11:54:20 +0000 2017 X-GM-THRID: 1585283607714561760 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread