drm/radeon: Return -ENOENT when a mode object can't be found
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Oct 2013 10:35:04 +0000 (13:35 +0300)
committerDave Airlie <airlied@redhat.com>
Wed, 6 Nov 2013 03:25:20 +0000 (13:25 +1000)
Let's be a bit more consistent with our error values.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r600_cs.c

index d71333033b2ba0bc63f9e710a23f710d7b96b066..784983d7815803205a5799d3243be2c995939dc1 100644 (file)
@@ -1434,7 +1434,7 @@ int r100_cs_packet_parse_vline(struct radeon_cs_parser *p)
        obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
        if (!obj) {
                DRM_ERROR("cannot find crtc %d\n", crtc_id);
-               return -EINVAL;
+               return -ENOENT;
        }
        crtc = obj_to_crtc(obj);
        radeon_crtc = to_radeon_crtc(crtc);
index 1abaa2be460db90011347f48337d8262e55afb65..5dceea6f71ae450cf925b0d7e119783c801d6ebd 100644 (file)
@@ -887,7 +887,7 @@ int r600_cs_common_vline_parse(struct radeon_cs_parser *p,
        obj = drm_mode_object_find(p->rdev->ddev, crtc_id, DRM_MODE_OBJECT_CRTC);
        if (!obj) {
                DRM_ERROR("cannot find crtc %d\n", crtc_id);
-               return -EINVAL;
+               return -ENOENT;
        }
        crtc = obj_to_crtc(obj);
        radeon_crtc = to_radeon_crtc(crtc);