LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org> To: Vijendar Mukunda <Vijendar.Mukunda@amd.com> 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 Date: Tue, 28 Nov 2017 11:52:10 +0000 [thread overview] Message-ID: <20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk> (raw) In-Reply-To: <1511844224-32404-1-git-send-email-Vijendar.Mukunda@amd.com> [-- Attachment #1: Type: text/plain, Size: 851 bytes --] 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2017-11-28 11:52 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-11-28 4:43 [PATCH] ASoC: amd: added error checks in dma driver Vijendar Mukunda 2017-11-28 11:52 ` Mark Brown [this message] 2017-11-30 5:29 ` Mukunda,Vijendar -- strict thread matches above, loose matches on Subject: below -- 2017-12-04 15:16 Vijendar Mukunda 2017-12-04 17:54 ` Mark Brown 2017-11-23 16:30 Vijendar Mukunda 2017-11-23 16:59 ` Guenter Roeck 2017-11-23 17:29 ` Mark Brown 2017-11-24 11:07 ` Mukunda,Vijendar 2017-11-24 8:11 ` Guenter Roeck 2017-11-24 14:19 ` Mukunda,Vijendar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk \ --to=broonie@kernel.org \ --cc=Alexander.Deucher@amd.com \ --cc=Vijendar.Mukunda@amd.com \ --cc=alsa-devel@alsa-project.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=perex@perex.cz \ --cc=tiwai@suse.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).