Commit c3739878 authored by Drew Davenport's avatar Drew Davenport Committed by Rob Clark

drm/msm/dpu: Remove unnecessary NULL checks

drm_crtc.dev will never be NULL, so no need to check it.
Signed-off-by: default avatarDrew Davenport <ddavenport@chromium.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 422ed755
...@@ -33,11 +33,6 @@ static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc) ...@@ -33,11 +33,6 @@ static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc)
{ {
struct msm_drm_private *priv; struct msm_drm_private *priv;
if (!crtc->dev) {
DPU_ERROR("invalid device\n");
return NULL;
}
priv = crtc->dev->dev_private; priv = crtc->dev->dev_private;
if (!priv->kms) { if (!priv->kms) {
DPU_ERROR("invalid kms\n"); DPU_ERROR("invalid kms\n");
......
...@@ -266,7 +266,7 @@ enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc) ...@@ -266,7 +266,7 @@ enum dpu_intf_mode dpu_crtc_get_intf_mode(struct drm_crtc *crtc)
{ {
struct drm_encoder *encoder; struct drm_encoder *encoder;
if (!crtc || !crtc->dev) { if (!crtc) {
DPU_ERROR("invalid crtc\n"); DPU_ERROR("invalid crtc\n");
return INTF_MODE_NONE; return INTF_MODE_NONE;
} }
...@@ -694,7 +694,7 @@ static void dpu_crtc_disable(struct drm_crtc *crtc, ...@@ -694,7 +694,7 @@ static void dpu_crtc_disable(struct drm_crtc *crtc,
unsigned long flags; unsigned long flags;
bool release_bandwidth = false; bool release_bandwidth = false;
if (!crtc || !crtc->dev || !crtc->state) { if (!crtc || !crtc->state) {
DPU_ERROR("invalid crtc\n"); DPU_ERROR("invalid crtc\n");
return; return;
} }
...@@ -766,7 +766,7 @@ static void dpu_crtc_enable(struct drm_crtc *crtc, ...@@ -766,7 +766,7 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
struct msm_drm_private *priv; struct msm_drm_private *priv;
bool request_bandwidth; bool request_bandwidth;
if (!crtc || !crtc->dev) { if (!crtc) {
DPU_ERROR("invalid crtc\n"); DPU_ERROR("invalid crtc\n");
return; return;
} }
......
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