mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
422ed75581
commit
c3739878a9
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue