mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
drm/msm/dpu: dont_use IS_ERR_OR_NULL for encoder phys backends
The functions dpu_encoder_phys_foo_init() can not return NULL. Replace corresponding IS_ERR_OR_NULL() checks with just IS_ERR(). Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/485452/ Link: https://lore.kernel.org/r/20220507115942.1705872-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
de7d480f5e
commit
b1ed585a16
|
|
@ -2142,10 +2142,10 @@ static int dpu_encoder_virt_add_phys_encs(
|
|||
if (disp_info->capabilities & MSM_DISPLAY_CAP_VID_MODE) {
|
||||
enc = dpu_encoder_phys_vid_init(params);
|
||||
|
||||
if (IS_ERR_OR_NULL(enc)) {
|
||||
if (IS_ERR(enc)) {
|
||||
DPU_ERROR_ENC(dpu_enc, "failed to init vid enc: %ld\n",
|
||||
PTR_ERR(enc));
|
||||
return enc == NULL ? -EINVAL : PTR_ERR(enc);
|
||||
return PTR_ERR(enc);
|
||||
}
|
||||
|
||||
dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
|
||||
|
|
@ -2155,10 +2155,10 @@ static int dpu_encoder_virt_add_phys_encs(
|
|||
if (disp_info->capabilities & MSM_DISPLAY_CAP_CMD_MODE) {
|
||||
enc = dpu_encoder_phys_cmd_init(params);
|
||||
|
||||
if (IS_ERR_OR_NULL(enc)) {
|
||||
if (IS_ERR(enc)) {
|
||||
DPU_ERROR_ENC(dpu_enc, "failed to init cmd enc: %ld\n",
|
||||
PTR_ERR(enc));
|
||||
return enc == NULL ? -EINVAL : PTR_ERR(enc);
|
||||
return PTR_ERR(enc);
|
||||
}
|
||||
|
||||
dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
|
||||
|
|
@ -2168,10 +2168,10 @@ static int dpu_encoder_virt_add_phys_encs(
|
|||
if (disp_info->intf_type == DRM_MODE_ENCODER_VIRTUAL) {
|
||||
enc = dpu_encoder_phys_wb_init(params);
|
||||
|
||||
if (IS_ERR_OR_NULL(enc)) {
|
||||
if (IS_ERR(enc)) {
|
||||
DPU_ERROR_ENC(dpu_enc, "failed to init wb enc: %ld\n",
|
||||
PTR_ERR(enc));
|
||||
return enc == NULL ? -EINVAL : PTR_ERR(enc);
|
||||
return PTR_ERR(enc);
|
||||
}
|
||||
|
||||
dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user