Commit 542a5db2 authored by Ameer Hamza's avatar Ameer Hamza Committed by Rob Clark

drm/msm/dpu: removed logically dead code

Fixed coverity warning by removing the dead code

Addresses-Coverity: 1494147 ("Logically dead code")
Signed-off-by: default avatarAmeer Hamza <amhamza.mgc@gmail.com>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211203193253.108813-1-amhamza.mgc@gmail.comSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 53d22794
...@@ -698,17 +698,17 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init( ...@@ -698,17 +698,17 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
{ {
struct dpu_encoder_phys *phys_enc = NULL; struct dpu_encoder_phys *phys_enc = NULL;
struct dpu_encoder_irq *irq; struct dpu_encoder_irq *irq;
int i, ret = 0; int i;
if (!p) { if (!p) {
ret = -EINVAL; DPU_ERROR("failed to create encoder due to invalid parameter\n");
goto fail; return ERR_PTR(-EINVAL);
} }
phys_enc = kzalloc(sizeof(*phys_enc), GFP_KERNEL); phys_enc = kzalloc(sizeof(*phys_enc), GFP_KERNEL);
if (!phys_enc) { if (!phys_enc) {
ret = -ENOMEM; DPU_ERROR("failed to create encoder due to memory allocation error\n");
goto fail; return ERR_PTR(-ENOMEM);
} }
phys_enc->hw_mdptop = p->dpu_kms->hw_mdp; phys_enc->hw_mdptop = p->dpu_kms->hw_mdp;
...@@ -748,11 +748,4 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init( ...@@ -748,11 +748,4 @@ struct dpu_encoder_phys *dpu_encoder_phys_vid_init(
DPU_DEBUG_VIDENC(phys_enc, "created intf idx:%d\n", p->intf_idx); DPU_DEBUG_VIDENC(phys_enc, "created intf idx:%d\n", p->intf_idx);
return phys_enc; return phys_enc;
fail:
DPU_ERROR("failed to create encoder\n");
if (phys_enc)
dpu_encoder_phys_vid_destroy(phys_enc);
return ERR_PTR(ret);
} }
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