diff options
| author | Imre Deak <imre.deak@intel.com> | 2017-04-26 09:40:13 -0400 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-05-08 11:44:24 -0400 |
| commit | 52b18e3a5a4db51e3b30bdb0ed4295595523105a (patch) | |
| tree | 2033902f6801c4569752940c20096d10cfc88081 /drivers | |
| parent | 47a369deaf31d247bb0074e31ecbccb44e80e542 (diff) | |
drm: Remove redundant NULL check during atomic plane commit
plane_state can't be NULL anywhere in this function, so the NULL check
at the end is redundant, remove it.
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1493214013-15580-9-git-send-email-imre.deak@intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/drm_plane_helper.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c index 9854a503e201..2c27f6f5a668 100644 --- a/drivers/gpu/drm/drm_plane_helper.c +++ b/drivers/gpu/drm/drm_plane_helper.c | |||
| @@ -511,12 +511,10 @@ int drm_plane_helper_commit(struct drm_plane *plane, | |||
| 511 | if (plane_funcs->cleanup_fb) | 511 | if (plane_funcs->cleanup_fb) |
| 512 | plane_funcs->cleanup_fb(plane, plane_state); | 512 | plane_funcs->cleanup_fb(plane, plane_state); |
| 513 | out: | 513 | out: |
| 514 | if (plane_state) { | 514 | if (plane->funcs->atomic_destroy_state) |
| 515 | if (plane->funcs->atomic_destroy_state) | 515 | plane->funcs->atomic_destroy_state(plane, plane_state); |
| 516 | plane->funcs->atomic_destroy_state(plane, plane_state); | 516 | else |
| 517 | else | 517 | drm_atomic_helper_plane_destroy_state(plane, plane_state); |
| 518 | drm_atomic_helper_plane_destroy_state(plane, plane_state); | ||
| 519 | } | ||
| 520 | 518 | ||
| 521 | return ret; | 519 | return ret; |
| 522 | } | 520 | } |
