linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: Timur Tabi <timur@tabi.org>, Xiubo Li <Xiubo.Lee@gmail.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value
Date: Fri, 30 Jun 2017 21:51:41 -0700	[thread overview]
Message-ID: <20170701045140.GA9664@Asurada> (raw)
In-Reply-To: <20170630221735.GA17951@embeddedgus>

On Fri, Jun 30, 2017 at 05:17:35PM -0500, Gustavo A. R. Silva wrote:
> Check return value from call to platform_get_irq(),
> so in case of failure print error message and propagate
> the return value.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

Thanks

> ---
>  sound/soc/fsl/imx-ssi.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
> index b95132e..0679061 100644
> --- a/sound/soc/fsl/imx-ssi.c
> +++ b/sound/soc/fsl/imx-ssi.c
> @@ -527,6 +527,10 @@ static int imx_ssi_probe(struct platform_device *pdev)
>  	}
>  
>  	ssi->irq = platform_get_irq(pdev, 0);
> +	if (ssi->irq < 0) {
> +		dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq);
> +		return ssi->irq;
> +	}
>  
>  	ssi->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(ssi->clk)) {
> -- 
> 2.5.0
> 

  reply	other threads:[~2017-07-01  4:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-30 22:17 [PATCH] ASoC: imx-ssi: add check on platform_get_irq return value Gustavo A. R. Silva
2017-07-01  4:51 ` Nicolin Chen [this message]
2017-07-07 12:51 ` Applied "ASoC: imx-ssi: add check on platform_get_irq return value" to the asoc tree Mark Brown

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=20170701045140.GA9664@Asurada \
    --to=nicoleotsuka@gmail.com \
    --cc=Xiubo.Lee@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=garsilva@embeddedor.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=perex@perex.cz \
    --cc=timur@tabi.org \
    --cc=tiwai@suse.com \
    /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).