Commit 482ade3e authored by Sui Jingfeng's avatar Sui Jingfeng Committed by Robert Foss

drm/bridge: tfp410: Remove a redundant check on existence of bridge->encoder

Because the existence of bridge->encoder has already been checked before
the simple_bridge_attach() function get called, And 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 the tfp410_attach() function get called.

Remove the redundant checking codes "if (!bridge->encoder) { ... }".
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarSui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: default avatarRobert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240513153109.46786-3-sui.jingfeng@linux.dev
parent f0a83a2c
...@@ -133,11 +133,6 @@ static int tfp410_attach(struct drm_bridge *bridge, ...@@ -133,11 +133,6 @@ static int tfp410_attach(struct drm_bridge *bridge,
if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)
return 0; return 0;
if (!bridge->encoder) {
dev_err(dvi->dev, "Missing encoder\n");
return -ENODEV;
}
if (dvi->next_bridge->ops & DRM_BRIDGE_OP_DETECT) if (dvi->next_bridge->ops & DRM_BRIDGE_OP_DETECT)
dvi->connector.polled = DRM_CONNECTOR_POLL_HPD; dvi->connector.polled = DRM_CONNECTOR_POLL_HPD;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment