Skip to content

Commit

Permalink
drm/gma500: Return -ENOENT when a mode object can't be found
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ville Syrjälä authored and Dave Airlie committed Nov 6, 2013
1 parent 37c4e70 commit 4f22466
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/gma500/psb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int psb_gamma_ioctl(struct drm_device *dev, void *data,
obj = drm_mode_object_find(dev, obj_id, DRM_MODE_OBJECT_CONNECTOR);
if (!obj) {
dev_dbg(dev->dev, "Invalid Connector object.\n");
return -EINVAL;
return -ENOENT;
}

connector = obj_to_connector(obj);
Expand Down Expand Up @@ -491,7 +491,7 @@ static int psb_mode_operation_ioctl(struct drm_device *dev, void *data,
obj = drm_mode_object_find(dev, obj_id,
DRM_MODE_OBJECT_CONNECTOR);
if (!obj) {
ret = -EINVAL;
ret = -ENOENT;
goto mode_op_out;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/gma500/psb_intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ int psb_intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,

if (!drmmode_obj) {
dev_err(dev->dev, "no such CRTC id\n");
return -EINVAL;
return -ENOENT;
}

crtc = to_gma_crtc(obj_to_crtc(drmmode_obj));
Expand Down

0 comments on commit 4f22466

Please sign in to comment.