Skip to content

Commit

Permalink
drm/i915: use ERR_CAST instead of ERR_PTR/PTR_ERR
Browse files Browse the repository at this point in the history
Inspired by scripts/coccinelle/api/err_cast.cocci

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Fabian Frederick authored and Daniel Vetter committed May 8, 2015
1 parent 06615ee commit 0b6cc18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0b6cc18

Please sign in to comment.