[PATCH v2] media: rp1-cfe: Use IS_ERR() check for media_entity_remote_source_pad_unique()

Tomi Valkeinen tomi.valkeinen at ideasonboard.com
Mon Nov 2 03:32:46 PST 2026


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 at vger.kernel.org
> Signed-off-by: Ingyu Jang <ingyujang25 at korea.ac.kr>
> Reviewed-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
> Reviewed-by: Jai Luthra <jai.luthra at ideasonboard.com>

Reviewed-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>

  Tomi




More information about the linux-arm-kernel mailing list