Received: by 10.223.164.202 with SMTP id h10csp2938380wrb; Tue, 28 Nov 2017 03:54:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMYMyUgIIvT8MRpZ3WHOi9XN+JCC/wxqXYpypD7BBgEVpl1uhdYgRWiwgE8NIX++QABrODJu X-Received: by 10.98.202.217 with SMTP id y86mr15315297pfk.118.1511870060624; Tue, 28 Nov 2017 03:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511870060; cv=none; d=google.com; s=arc-20160816; b=yDyY+SQn3F6zIhWlAUmIvqaLLrN3wk65Pti6oaHRVj4ESTHsdFLUlPnLYochXNDtZ7 KwsmCb8qpicU3h0hpwNd+uO0hu524jjo9rattUBPvQ8zEmxayYvQOLisRaHV7dI34nY0 7Dkg/ijAt1W5qvT/vLKYFvB9vCQ2IT7xAFw8LNri5Dev+zAmqb9qEXX/qo0jkYRkSdAL 8fC59Rh1ArUxz72N86/7jpLlS42BGlRUabRdPbTh7uOWIkT8QtiuT4UoqiKT6diyXJfD FuSmXmEkEef3wa4F/1TwDVEZ632dbNgSpnWTce32mMH+HKk+bjx85dnmOi5fAuwSziYl mMZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=E9TJmzX6qCBsvWIa+C8wdCkZDLraxsmZ8NboWDbY0Iw=; b=U9d2ZGQAG8llg5pIzGVmOzLm/w/JLLLAgrFwmilB4Hcfu903FTqkpwXBoHi3+YbjHd 2aUGGHzZOhJammL/z3oPzkF9/88PPuDxbmmLgMxaVHhsEhbmhB5BJLzodNfh0huhdoU9 Lrr20UPd2i28DwP7Y+zwW1XG92JbBkAy3fUZk/P5e1yw+VHcpbhYgcTJ6w9fsjdsANJy DYcLAp96GTEkNiTeYipt8dZwomucIImqroSeihFjMslmDlinyjQsAyMhfi/YQtgSJz/u y0sBJj0QDXeo/LLGnfOHNCNb2dqRQX+Q9aP1HR2J+yIVevY7u2pxSeTXK3q7H9tKb7QD yXMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=KVAFLYZb; 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 f4si24888503plt.685.2017.11.28.03.54.09; Tue, 28 Nov 2017 03:54:20 -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=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=KVAFLYZb; 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 S932502AbdK1LwT (ORCPT + 78 others); Tue, 28 Nov 2017 06:52:19 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:60142 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182AbdK1LwS (ORCPT ); Tue, 28 Nov 2017 06:52:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=E9TJmzX6qCBsvWIa+C8wdCkZDLraxsmZ8NboWDbY0Iw=; b=KVAFLYZbd3mZLiIBmD0hY0RaH ZXCH3+MXJ5I+ORb13h0jFgTAFbblXDXk+UInYdxXMfQnoiAIYHk48d+o9OrVIyHoatjDjHUBWn/B0 GespM7hCuObn71FpwclEk3JOKFC5v6vhYhodHWgn0q1JzejVeL4HfAmmn7Ay6b+U5AUKU=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eJeQt-0008Fi-1C; Tue, 28 Nov 2017 11:52:11 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eJeQs-0004H8-EB; Tue, 28 Nov 2017 11:52:10 +0000 Date: Tue, 28 Nov 2017 11:52:10 +0000 From: Mark Brown To: Vijendar Mukunda Cc: alsa-devel@alsa-project.org, tiwai@suse.de, lgirdwood@gmail.com, perex@perex.cz, Alexander.Deucher@amd.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: amd: added error checks in dma driver Message-ID: <20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk> References: <1511844224-32404-1-git-send-email-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vzvdiw5dgntn7l5w" Content-Disposition: inline In-Reply-To: <1511844224-32404-1-git-send-email-Vijendar.Mukunda@amd.com> X-Cookie: Keep out of reach of children. User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vzvdiw5dgntn7l5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D acp_init(audio_drv_data->acp_mmio, audio_drv_data->asic_type= ); > + if (status) { > + dev_err(&pdev->dev, "ACP Init failed\n"); > + return status; > + } > =20 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 =3D dev_get_drvdata(&pdev->dev); > =20 > - acp_deinit(adata->acp_mmio); > + status =3D 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. --vzvdiw5dgntn7l5w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlodTecACgkQJNaLcl1U h9B+oAf/Yu/LTK7xxSOEYlKwd6lo5PosdmH08qlURPKyIMayCqTRL68hg4yx532F l1T4+PNZT3UXMxQDQP0G51IM7PQFVLk4TlMdJrwbVP55TeYBz6vHpTLjCkHrU/nB mh7LDB6sPjF1dtabmLYy5TJgmpF0zP6ZAmK+OuQ48tahF1diz2rV/GeXmIk1/bHD k4WPj8KE8yyx8A6O7dVLcrgvOBwEIWTLabHZx4LtOnKzScLqNpPw8/ocaPWVLLEx /eJRrk1FQFPULsf5+fvU0Ay9mpWIFBcgw9LxNjCdg6+X3LMVdTDiRNzgjWnlep3x QkUV1QbGZMcs7JsoyrYhLUwFXzay0Q== =U1Jk -----END PGP SIGNATURE----- --vzvdiw5dgntn7l5w-- From 1585283607714561760@xxx Tue Nov 28 04:44:20 +0000 2017 X-GM-THRID: 1585283607714561760 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread