From: Jai Luthra <jai.luthra@ideasonboard.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Jai Luthra <jai.luthra@linux.dev>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] media: ti: j721e-csi2rx: Fix NULL vs IS_ERR() bug in ti_csi2rx_request_max_ppc()
Date: Wed, 27 Aug 2025 19:39:55 +0530 [thread overview]
Message-ID: <175630379558.1633224.13627427442522908758@freya> (raw)
In-Reply-To: <aK8CATf4EdcYcTe-@stanley.mountain>
Hi Dan,
Quoting Dan Carpenter (2025-08-27 18:32:57)
> The media_entity_remote_source_pad_unique() function never returns NULL,
> it returns error pointers. Change this check from a NULL check to an
> IS_ERR() check.
>
> Fixes: 31f91c5224cd ("media: ti: j721e-csi2rx: Support multiple pixels per clock")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> index 3992f8b754b7..b75aa363d1bf 100644
> --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
> @@ -497,7 +497,7 @@ static void ti_csi2rx_request_max_ppc(struct ti_csi2rx_dev *csi)
> int ret;
>
> pad = media_entity_remote_source_pad_unique(&csi->vdev.entity);
> - if (!pad)
> + if (IS_ERR(pad))
Argh, my bad. Thanks for the quick fix.
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
> return;
>
> ret = cdns_csi2rx_negotiate_ppc(csi->source, pad->index, &ppc);
> --
> 2.47.2
>
prev parent reply other threads:[~2025-08-27 14:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 13:02 Dan Carpenter
2025-08-27 14:09 ` Jai Luthra [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=175630379558.1633224.13627427442522908758@freya \
--to=jai.luthra@ideasonboard.com \
--cc=dan.carpenter@linaro.org \
--cc=hverkuil+cisco@kernel.org \
--cc=jai.luthra@linux.dev \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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®