1
0

media: ti: j721e-csi2rx: Fix NULL vs IS_ERR() bug in ti_csi2rx_request_max_ppc()

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: 31f91c5224 ("media: ti: j721e-csi2rx: Support multiple pixels per clock")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Dan Carpenter
2025-08-27 16:02:57 +03:00
committed by Mauro Carvalho Chehab
parent a1dcf9a069
commit 80ae11c1a5

View File

@@ -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))
return;
ret = cdns_csi2rx_negotiate_ppc(csi->source, pad->index, &ppc);