struct simple_bridge *sbridge = drm_bridge_to_simple_bridge(bridge);
int ret;
- if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) {
- DRM_ERROR("Fix bridge driver to make connector optional!");
- return -EINVAL;
- }
-
ret = drm_bridge_attach(bridge->encoder, sbridge->next_bridge, bridge,
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret < 0)
return ret;
+ if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)
+ return 0;
+
if (!bridge->encoder) {
DRM_ERROR("Missing encoder\n");
return -ENODEV;
return ret;
}
- drm_connector_attach_encoder(&sbridge->connector,
- bridge->encoder);
+ drm_connector_attach_encoder(&sbridge->connector, bridge->encoder);
return 0;
}