diff options
author | Drew Davenport <ddavenport@chromium.org> | 2019-09-06 13:23:42 -0600 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2019-10-07 08:24:29 -0700 |
commit | c3739878a9e511d272358d5821d073795ead7c61 (patch) | |
tree | b950ff94ee9f8d91bd9b1f895b4162b1874e6671 | |
parent | 422ed75581176ca8be2c87ea1c3720608dc46212 (diff) | |
download | lwn-c3739878a9e511d272358d5821d073795ead7c61.tar.gz lwn-c3739878a9e511d272358d5821d073795ead7c61.zip |
drm/msm/dpu: Remove unnecessary NULL checks
drm_crtc.dev will never be NULL, so no need to check it.
Signed-off-by: Drew Davenport <ddavenport@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 6 |
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 094d74635fb7..839887a3a80c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c @@ -33,11 +33,6 @@ static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc) { struct msm_drm_private *priv; - if (!crtc->dev) { - DPU_ERROR("invalid device\n"); - return NULL; - } - priv = crtc->dev->dev_private; if (!priv->kms) { DPU_ERROR("invalid kms\n"); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index ead7d657097c..0b9dc042d2e2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -266,7 +266,7 @@ enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc) { struct drm_encoder *encoder; - if (!crtc || !crtc->dev) { + if (!crtc) { DPU_ERROR("invalid crtc\n"); return INTF_MODE_NONE; } @@ -694,7 +694,7 @@ static void dpu_crtc_disable(struct drm_crtc *crtc, unsigned long flags; bool release_bandwidth = false; - if (!crtc || !crtc->dev || !crtc->state) { + if (!crtc || !crtc->state) { DPU_ERROR("invalid crtc\n"); return; } @@ -766,7 +766,7 @@ static void dpu_crtc_enable(struct drm_crtc *crtc, struct msm_drm_private *priv; bool request_bandwidth; - if (!crtc || !crtc->dev) { + if (!crtc) { DPU_ERROR("invalid crtc\n"); return; } |