media: imx: imx7-media-csi: Fix error handling in imx7_csi_async_register()
authorFrieder Schrempf <frieder.schrempf@kontron.de>
Wed, 15 Feb 2023 17:16:38 +0000 (18:16 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 11 Apr 2023 16:11:53 +0000 (18:11 +0200)
commita56b3e151e30da1f71fcb0b5726bb592ee4e30b6
treebcb2f563a4708d18f9f2701e078c9267f2d396c3
parent7cfb35d3a80029d1fa697d6fe5a5e89990b5c508
media: imx: imx7-media-csi: Fix error handling in imx7_csi_async_register()

The CSI requires a connected source subdev to operate. If
fwnode_graph_get_endpoint_by_id() fails and returns NULL, there is no
point in going on. Print an error message and abort instead.

Also we don't need to check for an existing asd. Any failure of
v4l2_async_nf_add_fwnode_remote() should abort the probe.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/nxp/imx7-media-csi.c