From: Chris Wilson Date: Fri, 24 Jun 2016 13:00:24 +0000 (+0100) Subject: drm/i915: Remove user controllable DRM_ERROR for intel_get_pipe_from_crtc_id() X-Git-Tag: v4.9.8~1110^2~42^2~406 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71240ed20df09e60f13db951dc9573168f5fd71e;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915: Remove user controllable DRM_ERROR for intel_get_pipe_from_crtc_id() Don't emit a driver DRM_ERROR for a user passing in an invalid CRTC id, simply report it is missing back to the user. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1466773227-7994-12-git-send-email-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c325717..c3b5dc8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14633,11 +14633,8 @@ int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data, struct intel_crtc *crtc; drmmode_crtc = drm_crtc_find(dev, pipe_from_crtc_id->crtc_id); - - if (!drmmode_crtc) { - DRM_ERROR("no such CRTC id\n"); + if (!drmmode_crtc) return -ENOENT; - } crtc = to_intel_crtc(drmmode_crtc); pipe_from_crtc_id->pipe = crtc->pipe;