LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Mark Brown <broonie@kernel.org>
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: Thu, 30 Nov 2017 10:59:17 +0530	[thread overview]
Message-ID: <e6e54494-0579-7447-cee9-223a579f06bf@amd.com> (raw)
In-Reply-To: <20171128115210.n3lp3s2ryygx2m3v@sirena.org.uk>



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.

  reply	other threads:[~2017-11-30  5:28 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
2017-11-30  5:29   ` Mukunda,Vijendar [this message]
  -- 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=e6e54494-0579-7447-cee9-223a579f06bf@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.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: link
Be 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).