From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH 1/9] media: qcom: camss: cleanup media device allocated resource on error path
Date: Fri, 13 Jun 2025 16:36:23 +0100 [thread overview]
Message-ID: <0798f626-0ed7-47ad-bd9c-39732cd4aa19@linaro.org> (raw)
In-Reply-To: <20250513142353.2572563-2-vladimir.zapolskiy@linaro.org>
On 13/05/2025 15:23, Vladimir Zapolskiy wrote:
> A call to media_device_init() requires media_device_cleanup() counterpart
> to complete cleanup and release any allocated resources.
>
> This has been done in the driver .remove() right from the beginning, but
> error paths on .probe() shall also be fixed.
>
> Fixes: a1d7c116fcf7 ("media: camms: Add core files")
> Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
> ---
> drivers/media/platform/qcom/camss/camss.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 06f42875702f..f76773dbd296 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c
> @@ -3625,7 +3625,7 @@ static int camss_probe(struct platform_device *pdev)
> ret = v4l2_device_register(camss->dev, &camss->v4l2_dev);
> if (ret < 0) {
> dev_err(dev, "Failed to register V4L2 device: %d\n", ret);
> - goto err_genpd_cleanup;
> + goto err_media_device_cleanup;
> }
>
> v4l2_async_nf_init(&camss->notifier, &camss->v4l2_dev);
> @@ -3680,6 +3680,8 @@ static int camss_probe(struct platform_device *pdev)
> v4l2_device_unregister(&camss->v4l2_dev);
> v4l2_async_nf_cleanup(&camss->notifier);
> pm_runtime_disable(dev);
> +err_media_device_cleanup:
> + media_device_cleanup(&camss->media_dev);
> err_genpd_cleanup:
> camss_genpd_cleanup(camss);
>
> --
> 2.45.2
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next prev parent reply other threads:[~2025-06-13 15:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 14:23 [PATCH 0/9] media: qcom: camss: a number of cleanups and fixes Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 1/9] media: qcom: camss: cleanup media device allocated resource on error path Vladimir Zapolskiy
2025-06-13 15:36 ` Bryan O'Donoghue [this message]
2025-05-13 14:23 ` [PATCH 2/9] media: qcom: camss: remove duplicated csiphy_formats_sc7280 data Vladimir Zapolskiy
2025-05-13 16:30 ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 3/9] media: qcom: camss: remove .link_entities Vladimir Zapolskiy
2025-05-13 16:29 ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 4/9] media: qcom: camss: register camss media device before subdevices Vladimir Zapolskiy
2025-06-13 9:06 ` Bryan O'Donoghue
2025-06-17 16:14 ` Vladimir Zapolskiy
2025-06-23 9:24 ` neil.armstrong
2025-05-13 14:23 ` [PATCH 5/9] media: qcom: camss: unconditionally set async notifier of subdevices Vladimir Zapolskiy
2025-05-13 15:46 ` Bryan O'Donoghue
2025-05-14 15:16 ` Vladimir Zapolskiy
2025-05-15 9:25 ` Loic Poulain
2025-06-13 9:11 ` Bryan O'Donoghue
2025-06-17 16:22 ` Vladimir Zapolskiy
2025-06-23 9:26 ` neil.armstrong
2025-05-13 14:23 ` [PATCH 6/9] media: qcom: camss: simplify camss_subdev_notifier_complete() function Vladimir Zapolskiy
2025-06-13 9:13 ` Bryan O'Donoghue
2025-05-13 14:23 ` [PATCH 7/9] media: qcom: camss: change internals of endpoint parsing to fwnode handling Vladimir Zapolskiy
2025-06-13 9:30 ` Bryan O'Donoghue
2025-06-17 16:30 ` Vladimir Zapolskiy
2025-06-23 9:29 ` neil.armstrong
2025-06-23 12:00 ` Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 8/9] media: qcom: camss: use a handy v4l2_async_nf_add_fwnode_remote() function Vladimir Zapolskiy
2025-05-13 14:23 ` [PATCH 9/9] MAINTAINERS: add myself as a CAMSS patch reviewer Vladimir Zapolskiy
2025-05-13 15:06 ` Bryan O'Donoghue
2025-06-06 10:52 ` [PATCH 0/9] media: qcom: camss: a number of cleanups and fixes Vladimir Zapolskiy
2025-06-10 17:26 ` Vladimir Zapolskiy
2025-06-10 18:53 ` Bryan O'Donoghue
2025-06-10 21:15 ` Vladimir Zapolskiy
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=0798f626-0ed7-47ad-bd9c-39732cd4aa19@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=hans.verkuil@cisco.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rfoss@kernel.org \
--cc=todor.too@gmail.com \
--cc=vladimir.zapolskiy@linaro.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;
as well as URLs for NNTP newsgroup(s).