public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>
To: 박명훈 <mhun512@gmail.com>, "Mauro Carvalho Chehab" <mchehab@kernel.org>
Cc: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>, Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH] media: ti: vpe: unwind v4l2 device registration on probe error
Date: Mon, 4 May 2026 15:21:06 +0530	[thread overview]
Message-ID: <89a5e2e5-9469-439a-8def-8c7d30980cc4@ti.com> (raw)
In-Reply-To: <20260424000000.547-1-mhun512@gmail.com>

Hi,

On 26/04/26 18:46, 박명훈 wrote:
> From: Myeonghun Pak <mhun512@gmail.com>
> 
> If the vpe_top resource is missing, vpe_probe() returns -ENODEV after
> v4l2_device_register() has succeeded. Probe failures do not call the
> driver's remove callback, so the v4l2 device remains registered on that
> error path.
> 
> Route that failure through the existing v4l2_device_unregister() unwind
> label, matching the other errors after v4l2_device_register().
> 
> Fixes: 4d59c7d45585 ("media: ti-vpe: vpe: Add missing null pointer checks")
> Cc: stable@vger.kernel.org
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
> Notes for send preparation:
> - Fixes tag was validated against upstream history; the local row worktree
>    remains shallow/grafted and cannot verify it by itself.
> - Build was not completed because this worktree has no .config.
> 

Why can't you build test?

Having said that, the fix seems trivial and correct to me. Hence

Reviewed-by: Yemike Abhilash Chandra <y-abhilashchandra@ti.com>

>   drivers/media/platform/ti/vpe/vpe.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/ti/vpe/vpe.c b/drivers/media/platform/ti/vpe/vpe.c
> index a7e5a85e72..81bd1f9cee 100644
> --- a/drivers/media/platform/ti/vpe/vpe.c
> +++ b/drivers/media/platform/ti/vpe/vpe.c
> @@ -2539,7 +2539,8 @@ static int vpe_probe(struct platform_device *pdev)
>   						"vpe_top");
>   	if (!dev->res) {
>   		dev_err(&pdev->dev, "missing 'vpe_top' resources data\n");
> -		return -ENODEV;
> +		ret = -ENODEV;
> +		goto v4l2_dev_unreg;
>   	}
>   
>   	/*


      reply	other threads:[~2026-05-04  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-26 13:16 [PATCH] media: ti: vpe: unwind v4l2 device registration on probe error 박명훈
2026-05-04  9:51 ` Yemike Abhilash Chandra [this message]

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=89a5e2e5-9469-439a-8def-8c7d30980cc4@ti.com \
    --to=y-abhilashchandra@ti.com \
    --cc=ae878000@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mhun512@gmail.com \
    --cc=stable@vger.kernel.org \
    /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