Linux Media Controller development
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: mchehab@kernel.org, ezequiel@vanguardiasur.com.ar,
	hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com,
	"Xavier Roumegue (OSS)" <xavier.roumegue@oss.nxp.com>
Cc: Xavier Roumegue <xavier.roumegue@oss.nxp.com>,
	linux-media@vger.kernel.org, kernel test robot <lkp@intel.com>,
	Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] media: dw100: Add a missing unwind goto in dw100_probe()
Date: Tue, 03 Jan 2023 12:01:55 +0100	[thread overview]
Message-ID: <1962839.8hb0ThOEGa@steina-w> (raw)
In-Reply-To: <20230103105534.3018257-1-xavier.roumegue@oss.nxp.com>

Hi,

Am Dienstag, 3. Januar 2023, 11:55:34 CET schrieb Xavier Roumegue (OSS):
> From: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> 
> In case the IRQ allocation returns an error in dw100_probe(), the pm
> runtime is not disabled before to return.
> 
> Add the missing unwind goto on the error handling path of the IRQ
> allocation request.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
>  drivers/media/platform/nxp/dw100/dw100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/nxp/dw100/dw100.c
> b/drivers/media/platform/nxp/dw100/dw100.c index f6d48c36f386..189d60cd5ed1
> 100644
> --- a/drivers/media/platform/nxp/dw100/dw100.c
> +++ b/drivers/media/platform/nxp/dw100/dw100.c
> @@ -1571,7 +1571,7 @@ static int dw100_probe(struct platform_device *pdev)
>  			       dev_name(&pdev->dev), dw_dev);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "Failed to request irq: %d\n", ret);
> -		return ret;
> +		goto err_pm;
>  	}
> 
>  	ret = v4l2_device_register(&pdev->dev, &dw_dev->v4l2_dev);

Doesn't it make more sense to request/allocate the IRQ (and other resources) 
before enabling runtime PM?

Best regards,
Alexander




  reply	other threads:[~2023-01-03 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 10:55 [PATCH] media: dw100: Add a missing unwind goto in dw100_probe() Xavier Roumegue (OSS)
2023-01-03 11:01 ` Alexander Stein [this message]
2023-01-03 13:35   ` Xavier Roumegue (OSS)
2023-01-03 13:48     ` Alexander Stein
2023-01-03 13:52     ` Laurent Pinchart

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=1962839.8hb0ThOEGa@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=error27@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mchehab@kernel.org \
    --cc=xavier.roumegue@oss.nxp.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