drm/msm: potential error pointer dereference in init()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 4 Oct 2021 10:38:06 +0000 (13:38 +0300)
committerRob Clark <robdclark@chromium.org>
Fri, 15 Oct 2021 20:26:34 +0000 (13:26 -0700)
commitb6816441a14bbe356ba8590de79cfea2de6a085c
tree565ecd3e2650a87eba381c3f965500b3071c6f6e
parent3d91e50ff58364f6572ad268b508175d27800e51
drm/msm: potential error pointer dereference in init()

The msm_iommu_new() returns error pointers on failure so check for that
to avoid an Oops.

Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211004103806.GD25015@kili
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c