From: Michael Riesch <michael.riesch@collabora•com>
To: Chen Ni <nichen@iscas•ac.cn>, mehdi.djait@linux•intel.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
Subject: Re: [PATCH] media: rockchip: rkcif: Fix error handling for media_entity_remote_source_pad_unique()
Date: Wed, 3 Jun 2026 11:50:31 +0200 [thread overview]
Message-ID: <a80c978f-65e8-436e-a3d6-74cf50b5ea6a@collabora.com> (raw)
In-Reply-To: <20260522065548.2438545-1-nichen@iscas.ac.cn>
Hi Chen,
Thanks for the fix!
On 5/22/26 08:55, Chen Ni wrote:
> 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: Michael Riesch <michael.riesch@collabora•com>
Best regards,
Michael
> ---
> 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);
prev parent reply other threads:[~2026-06-03 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 6:55 [PATCH] media: rockchip: rkcif: Fix error handling for media_entity_remote_source_pad_unique() Chen Ni
2026-05-22 8:25 ` Mehdi Djait
2026-06-03 6:51 ` Jai Luthra
2026-06-03 9:50 ` Michael Riesch [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=a80c978f-65e8-436e-a3d6-74cf50b5ea6a@collabora.com \
--to=michael.riesch@collabora$(echo .)com \
--cc=bryan.odonoghue@linaro$(echo .)org \
--cc=gerald.loacker@wolfvision$(echo .)net \
--cc=heiko@sntech$(echo .)de \
--cc=hverkuil+cisco@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-media@vger$(echo .)kernel.org \
--cc=linux-rockchip@lists$(echo .)infradead.org \
--cc=mchehab@kernel$(echo .)org \
--cc=mehdi.djait@linux$(echo .)intel.com \
--cc=nichen@iscas$(echo .)ac.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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