Re: [PATCH v2] media: rp1-cfe: Use IS_ERR() check for media_entity_remote_source_pad_unique()
From: Tomi Valkeinen
Date: Mon Nov 02 2026 - 07:13:21 EST
Hi,
On 01/11/2026 15:24, Ingyu Jang wrote:
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.
Fixes: 6edb685abb2a ("media: raspberrypi: Add support for RP1-CFE")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Ingyu Jang <ingyujang25@xxxxxxxxxxx>
Reviewed-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
Reviewed-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
Tomi