From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Stefan Klug <stefan.klug@ideasonboard.com>
Cc: Dafna Hirschfeld <dafna@fastmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] media: rkisp1: Properly handle result of rkisp1_params_init_vb2_queue()
Date: Thu, 5 Jun 2025 11:25:29 +0300 [thread overview]
Message-ID: <20250605082529.GH3755@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20250523-supported-params-and-wdr-v3-1-7283b8536694@ideasonboard.com>
Hi Stefan,
Thank you for the patch.
On Fri, May 23, 2025 at 05:14:30PM +0200, Stefan Klug wrote:
> Properly handle the return of rkisp1_params_init_vb2_queue(). It is very
> unlikely that this ever fails without code changes but should be handled
> anyways.
>
> While at it rename the error label for easier extension in the upcoming
> patch.
I'd have kept that change for the next patch, as it's hard to review
here without looking at upcoming changes. There's no need for a v4 just
because of this.
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>
> Changes in v3:
> - Moved these changes into its own patch
> ---
> drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> index b28f4140c8a3..24a8de697f2b 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> @@ -2763,7 +2763,9 @@ int rkisp1_params_register(struct rkisp1_device *rkisp1)
> vdev->queue = &node->buf_queue;
> vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
> vdev->vfl_dir = VFL_DIR_TX;
> - rkisp1_params_init_vb2_queue(vdev->queue, params);
> + ret = rkisp1_params_init_vb2_queue(vdev->queue, params);
> + if (ret)
> + goto err_media;
>
> params->metafmt = &rkisp1_params_formats[RKISP1_PARAMS_FIXED];
>
> @@ -2777,18 +2779,18 @@ int rkisp1_params_register(struct rkisp1_device *rkisp1)
> node->pad.flags = MEDIA_PAD_FL_SOURCE;
> ret = media_entity_pads_init(&vdev->entity, 1, &node->pad);
> if (ret)
> - goto error;
> + goto err_media;
>
> ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
> if (ret) {
> dev_err(rkisp1->dev,
> "failed to register %s, ret=%d\n", vdev->name, ret);
> - goto error;
> + goto err_media;
> }
>
> return 0;
>
> -error:
> +err_media:
> media_entity_cleanup(&vdev->entity);
> mutex_destroy(&node->vlock);
> return ret;
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2025-06-05 8:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 15:14 [PATCH v3 0/3] media: rkisp1: Add RKISP1_CID_SUPPORTED_PARAMS_BLOCKS ctrl and WDR support Stefan Klug
2025-05-23 15:14 ` [PATCH v3 1/3] media: rkisp1: Properly handle result of rkisp1_params_init_vb2_queue() Stefan Klug
2025-06-05 8:25 ` Laurent Pinchart [this message]
2025-05-23 15:14 ` [PATCH v3 2/3] media: rkisp1: Add RKISP1_CID_SUPPORTED_PARAMS_BLOCKS control Stefan Klug
2025-06-05 8:28 ` Laurent Pinchart
2025-05-23 15:14 ` [PATCH v3 3/3] media: rockchip: rkisp1: Add support for Wide Dynamic Range Stefan Klug
2025-06-05 8:31 ` 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=20250605082529.GH3755@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=stefan.klug@ideasonboard.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
all inboxes | Powered by JetHome®