Commit 0b6cc188 authored by Fabian Frederick's avatar Fabian Frederick Committed by Daniel Vetter

drm/i915: use ERR_CAST instead of ERR_PTR/PTR_ERR

Inspired by scripts/coccinelle/api/err_cast.cocci
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 06615ee5
......@@ -1419,7 +1419,7 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
struct drm_crtc_state *crtc_state;
crtc_state = drm_atomic_get_crtc_state(state, &crtc->base);
if (IS_ERR(crtc_state))
return ERR_PTR(PTR_ERR(crtc_state));
return ERR_CAST(crtc_state);
return to_intel_crtc_state(crtc_state);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment