diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 0a22ef80d28e..37bb7ab3cbb0 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -2819,7 +2819,7 @@ void drm_property_destroy(struct drm_device *dev, struct drm_property *property) } EXPORT_SYMBOL(drm_property_destroy); -int drm_connector_attach_property(struct drm_connector *connector, +void drm_connector_attach_property(struct drm_connector *connector, struct drm_property *property, uint64_t init_val) { int i; @@ -2828,13 +2828,13 @@ int drm_connector_attach_property(struct drm_connector *connector, if (connector->property_ids[i] == 0) { connector->property_ids[i] = property->base.id; connector->property_values[i] = init_val; - break; + return; } } - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + WARN(1, "Failed to attach connector property. Please increase " + "DRM_CONNECTOR_MAX_PROPERTY by 1 for each time you see this " + "message\n"); } EXPORT_SYMBOL(drm_connector_attach_property); diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index f35e7edd7de2..036faec8a6fe 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -910,8 +910,8 @@ extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb); extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY); extern bool drm_crtc_in_use(struct drm_crtc *crtc); -extern int drm_connector_attach_property(struct drm_connector *connector, - struct drm_property *property, uint64_t init_val); +extern void drm_connector_attach_property(struct drm_connector *connector, + struct drm_property *property, uint64_t init_val); extern struct drm_property *drm_property_create(struct drm_device *dev, int flags, const char *name, int num_values); extern struct drm_property *drm_property_create_enum(struct drm_device *dev, int flags,