Commit ed02d3dd authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dpu: drop temp variable from dpu_encoder_phys_cmd_init()

There is no need to assign a result to temp varable just to return it
two lines below. Drop the temporary variable.
Reviewed-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280
Patchwork: https://patchwork.freedesktop.org/patch/540637/
Link: https://lore.kernel.org/r/20230601172236.564445-7-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 004be386
...@@ -756,15 +756,13 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init( ...@@ -756,15 +756,13 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init(
{ {
struct dpu_encoder_phys *phys_enc = NULL; struct dpu_encoder_phys *phys_enc = NULL;
struct dpu_encoder_phys_cmd *cmd_enc = NULL; struct dpu_encoder_phys_cmd *cmd_enc = NULL;
int ret = 0;
DPU_DEBUG("intf\n"); DPU_DEBUG("intf\n");
cmd_enc = kzalloc(sizeof(*cmd_enc), GFP_KERNEL); cmd_enc = kzalloc(sizeof(*cmd_enc), GFP_KERNEL);
if (!cmd_enc) { if (!cmd_enc) {
ret = -ENOMEM;
DPU_ERROR("failed to allocate\n"); DPU_ERROR("failed to allocate\n");
return ERR_PTR(ret); return ERR_PTR(-ENOMEM);
} }
phys_enc = &cmd_enc->base; phys_enc = &cmd_enc->base;
......
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