linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/2] [media] coda: Propagate the correct error on devm_request_threaded_irq()
       [not found] ` <1398704252-6256-2-git-send-email-fabio.estevam@freescale.com>
@ 2014-04-29 16:41   ` Philipp Zabel
  0 siblings, 0 replies; only message in thread
From: Philipp Zabel @ 2014-04-29 16:41 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: m.chehab, linux-media

Am Montag, den 28.04.2014, 13:57 -0300 schrieb Fabio Estevam:
> If devm_request_threaded_irq() fails, we should better propagate the real error.
> 
> Also, print out the error code in the dev_err message.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Both look fine to me.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

2/2 trivially conflicts with "[PATCH] media: coda: Use full device name
for request_irq()" by Alexander Shiyan.

> ---
>  drivers/media/platform/coda.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
> index ba7cb3f..1360b91 100644
> --- a/drivers/media/platform/coda.c
> +++ b/drivers/media/platform/coda.c
> @@ -3234,10 +3234,11 @@ static int coda_probe(struct platform_device *pdev)
>  		return irq;
>  	}
>  
> -	if (devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
> -		IRQF_ONESHOT, CODA_NAME, dev) < 0) {
> -		dev_err(&pdev->dev, "failed to request irq\n");
> -		return -ENOENT;
> +	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, coda_irq_handler,
> +					IRQF_ONESHOT, CODA_NAME, dev);
> +	if (ret < 0) {
> +		dev_err(&pdev->dev, "failed to request irq: %d\n", ret);
> +		return ret;
>  	}
>  
>  	/* Get IRAM pool from device tree or platform data */

regards
Philipp


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-29 16:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1398704252-6256-1-git-send-email-fabio.estevam@freescale.com>
     [not found] ` <1398704252-6256-2-git-send-email-fabio.estevam@freescale.com>
2014-04-29 16:41   ` [PATCH 2/2] [media] coda: Propagate the correct error on devm_request_threaded_irq() Philipp Zabel

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).