aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-05-15 17:09:00 -0400
committerDave Airlie <airlied@redhat.com>2012-05-17 06:11:06 -0400
commitafea2ad53f1fef0b57d0e59fa062f54797158b14 (patch)
treeecc489268ca805d985b71af7b74ca4f9d009e8d0 /drivers/gpu/drm/drm_crtc.c
parent26a3481586eb1918a75d338e31c990deab06fb5b (diff)
drm: WARN() when drm_connector_attach_property fails
Also return void instead of int. We have more than 100 callers and no one checks for the return value. If this function fails the property won't be exposed by the get/set ioctls, but we should probably survive. If this starts happening, the solution will be to increase DRM_CONNECTOR_MAX_PROPERTY and recompile the Kernel. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Rob Clark <rob.clark@linaro.org> Tested-by: Rob Clark <rob.clark@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c10
1 files changed, 5 insertions, 5 deletions
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)
2819} 2819}
2820EXPORT_SYMBOL(drm_property_destroy); 2820EXPORT_SYMBOL(drm_property_destroy);
2821 2821
2822int drm_connector_attach_property(struct drm_connector *connector, 2822void drm_connector_attach_property(struct drm_connector *connector,
2823 struct drm_property *property, uint64_t init_val) 2823 struct drm_property *property, uint64_t init_val)
2824{ 2824{
2825 int i; 2825 int i;
@@ -2828,13 +2828,13 @@ int drm_connector_attach_property(struct drm_connector *connector,
2828 if (connector->property_ids[i] == 0) { 2828 if (connector->property_ids[i] == 0) {
2829 connector->property_ids[i] = property->base.id; 2829 connector->property_ids[i] = property->base.id;
2830 connector->property_values[i] = init_val; 2830 connector->property_values[i] = init_val;
2831 break; 2831 return;
2832 } 2832 }
2833 } 2833 }
2834 2834
2835 if (i == DRM_CONNECTOR_MAX_PROPERTY) 2835 WARN(1, "Failed to attach connector property. Please increase "
2836 return -EINVAL; 2836 "DRM_CONNECTOR_MAX_PROPERTY by 1 for each time you see this "
2837 return 0; 2837 "message\n");
2838} 2838}
2839EXPORT_SYMBOL(drm_connector_attach_property); 2839EXPORT_SYMBOL(drm_connector_attach_property);
2840 2840