drm/msm/dp: Fix double free on error in msm_dp_bridge_init()
The "dp_bridge" pointer is allocated with devm_kzalloc() so it will be
freed automatically. Kfreeing it here will only lead to a double free.
Fixes: 8a3b4c17f8
("drm/msm/dp: employ bridge mechanism for display enable and disable")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20211215114900.GD14552@kili
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
Родитель
37897856ab
Коммит
48d0cf4a7c
|
@ -243,7 +243,6 @@ struct drm_bridge *msm_dp_bridge_init(struct msm_dp *dp_display, struct drm_devi
|
|||
rc = drm_bridge_attach(encoder, bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
|
||||
if (rc) {
|
||||
DRM_ERROR("failed to attach bridge, rc=%d\n", rc);
|
||||
kfree(dp_bridge);
|
||||
return ERR_PTR(rc);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче