From: Mehdi Djait <mehdi.djait@linux.intel.com>
To: Jang Ingyu <ingyujang25@korea.ac.kr>
Cc: Michael Riesch <michael.riesch@collabora.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: rockchip: rkcif: Use IS_ERR() check for media_entity_remote_source_pad_unique()
Date: Mon, 13 Jul 2026 10:55:19 +0200 [thread overview]
Message-ID: <alSnze0rfa6wnWk3@mdjait-mobl> (raw)
In-Reply-To: <20260710203016.2250058-1-ingyujang25@korea.ac.kr>
Hello,
On Sat, Jul 11, 2026 at 05:30:16AM +0900, Jang Ingyu wrote:
> From: Ingyu Jang <ingyujang25@korea.ac.kr>
>
> media_entity_remote_source_pad_unique() returns either a valid struct
> media_pad pointer or an error pointer (ERR_PTR(-ENOTUNIQ) or
> ERR_PTR(-ENOLINK)); it never returns NULL. The current NULL check
> therefore never triggers, and the "pad not connected" error path is
> unreachable.
>
> Replace the NULL check with an IS_ERR() check so the validation
> actually detects malformed media graphs.
>
> Signed-off-by: Ingyu Jang <ingyujang25@korea.ac.kr>
> ---
> 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 3130d420ad559..542aa877919df 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;
This was already fixed in:
https://lore.kernel.org/linux-media/20260522065548.2438545-1-nichen@iscas.ac.cn/
--
Kind Regards
Mehdi Djait
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2026-07-13 8:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 20:30 [PATCH] media: rockchip: rkcif: Use IS_ERR() check for media_entity_remote_source_pad_unique() Jang Ingyu
2026-07-13 8:55 ` Mehdi Djait [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=alSnze0rfa6wnWk3@mdjait-mobl \
--to=mehdi.djait@linux.intel.com \
--cc=heiko@sntech.de \
--cc=ingyujang25@korea.ac.kr \
--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=michael.riesch@collabora.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