]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/bridge: imx: Remove redundant checks on existence of bridge->encoder
authorSui Jingfeng <sui.jingfeng@linux.dev>
Mon, 13 May 2024 15:31:08 +0000 (23:31 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 13 May 2024 16:31:12 +0000 (18:31 +0200)
commitec74951a75070ab969943e438ead202beeec5134
treeca0208127b733dab639c5a25c8b34f0639544b5a
parent91942a37ebba1b810fa2e0ac20926f0c45f38023
drm/bridge: imx: Remove redundant checks on existence of bridge->encoder

The checks on the existence of bridge->encoder in the implementation of
drm_bridge_funcs::attach() is not necessary, as it has already been checked
in the drm_bridge_attach() function call by previous bridge or KMS driver.
The drm_bridge_attach() will quit with a negative error code returned if
it fails for some reasons, hence, it is guaranteed that the .encoder member
of the drm_bridge instance is not NULL when various i.MX specific bridge
attach functions are called.

Remove the redundant checking codes "if (!bridge->encoder) { ... }".

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-12-sui.jingfeng@linux.dev
drivers/gpu/drm/bridge/imx/imx-ldb-helper.c
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-link.c
drivers/gpu/drm/bridge/imx/imx8qxp-pxl2dpi.c