From: Jai Luthra <jai.luthra@ideasonboard.com>
To: Chen Ni <nichen@iscas.ac.cn>,
mehdi.djait@linux.intel.com, michael.riesch@collabora.com
Cc: mchehab@kernel.org, heiko@sntech.de, hverkuil+cisco@kernel.org,
gerald.loacker@wolfvision.net, bryan.odonoghue@linaro.org,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Chen Ni <nichen@iscas.ac.cn>
Subject: Re: [PATCH] media: rockchip: rkcif: Fix error handling for media_entity_remote_source_pad_unique()
Date: Wed, 03 Jun 2026 12:21:18 +0530 [thread overview]
Message-ID: <178046947892.1525445.1023288239828130272@freya> (raw)
In-Reply-To: <20260522065548.2438545-1-nichen@iscas.ac.cn>
Quoting Chen Ni (2026-05-22 12:25:48)
> The media_entity_remote_source_pad_unique() function returns an error
> pointer on failure, not NULL. Fix the check to use IS_ERR() and return
> PTR_ERR() to correctly handle allocation failures.
>
> Fixes: 501802e2ad51 ("media: rockchip: rkcif: add abstraction for dma blocks")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Thanks,
Jai
> ---
> drivers/media/platform/rockchip/rkcif/rkcif-stream.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
> index 3130d420ad55..542aa877919d 100644
> --- a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
> +++ b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c
> @@ -466,7 +466,7 @@ static int rkcif_stream_link_validate(struct media_link *link)
> struct rkcif_stream *stream = to_rkcif_stream(vdev);
> int ret = -EINVAL;
>
> - if (!media_entity_remote_source_pad_unique(link->sink->entity))
> + if (IS_ERR(media_entity_remote_source_pad_unique(link->sink->entity)))
> return -ENOTCONN;
>
> sd = media_entity_to_v4l2_subdev(link->source->entity);
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2026-06-03 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 6:55 Chen Ni
2026-05-22 8:25 ` Mehdi Djait
2026-06-03 6:51 ` Jai Luthra [this message]
2026-06-03 9:50 ` Michael Riesch
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=178046947892.1525445.1023288239828130272@freya \
--to=jai.luthra@ideasonboard.com \
--cc=bryan.odonoghue@linaro.org \
--cc=gerald.loacker@wolfvision.net \
--cc=heiko@sntech.de \
--cc=hverkuil+cisco@kernel.org \
--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=mehdi.djait@linux.intel.com \
--cc=michael.riesch@collabora.com \
--cc=nichen@iscas.ac.cn \
/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®