From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil@xs4all.nl>,
Detlev Casanova <detlev.casanova@collabora.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: rkvdec: Fix a NULL vs IS_ERR() bug in probe()
Date: Mon, 11 Aug 2025 10:20:31 -0400 [thread overview]
Message-ID: <0a0834d23f3d6d339bc26b73e2af6fe038e7deab.camel@collabora.com> (raw)
In-Reply-To: <696219e9-a1c7-4c87-b15c-1ffd42c95d58@sabinyo.mountain>
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
Hi Dan,
Le mercredi 25 juin 2025 à 10:23 -0500, Dan Carpenter a écrit :
> The iommu_paging_domain_alloc() function doesn't return NULL on error it
> returns error pointers. Update the check and then set ->empty_domain to
> NULL because the rest of the driver assumes it can be NULL.
>
> Fixes: ff8c5622f9f7 ("media: rkvdec: Restore iommu addresses on errors")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/staging/media/rkvdec/rkvdec.c | 4 +++-
I've re-applied to the now de-staged driver, and will send that as fixes for
6.17.
thanks,
Nicolas
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c
> b/drivers/staging/media/rkvdec/rkvdec.c
> index d707088ec0dc..1b7f27e4d961 100644
> --- a/drivers/staging/media/rkvdec/rkvdec.c
> +++ b/drivers/staging/media/rkvdec/rkvdec.c
> @@ -1162,8 +1162,10 @@ static int rkvdec_probe(struct platform_device *pdev)
> if (iommu_get_domain_for_dev(&pdev->dev)) {
> rkvdec->empty_domain = iommu_paging_domain_alloc(rkvdec-
> >dev);
>
> - if (!rkvdec->empty_domain)
> + if (IS_ERR(rkvdec->empty_domain)) {
> + rkvdec->empty_domain = NULL;
> dev_warn(rkvdec->dev, "cannot alloc new empty
> domain\n");
> + }
> }
>
> vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2025-08-11 14:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 15:23 [PATCH] media: rkvdec: Fix a NULL vs IS_ERR() bug in probe() Dan Carpenter
2025-06-25 16:13 ` Nicolas Dufresne
2025-07-15 20:30 ` Dan Carpenter
2025-07-21 14:08 ` Detlev Casanova
2025-08-11 14:20 ` Nicolas Dufresne [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=0a0834d23f3d6d339bc26b73e2af6fe038e7deab.camel@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=dan.carpenter@linaro.org \
--cc=detlev.casanova@collabora.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@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;
as well as URLs for NNTP newsgroup(s).