Skip to content

Commit

Permalink
drm: xlnx: db: fix a memory leak in probe
Browse files Browse the repository at this point in the history
Free "dp" before returning.

Fixes: be318d0 ("drm: xlnx: dp: Reset DisplayPort IP")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/86def134-9537-4939-912e-3a424e3a75b6@moroto.mountain
  • Loading branch information
Dan Carpenter authored and Tomi Valkeinen committed Apr 10, 2024
1 parent a18815a commit 6b2da5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xlnx/zynqmp_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ int zynqmp_dp_probe(struct zynqmp_dpsub *dpsub)

ret = zynqmp_dp_reset(dp, true);
if (ret < 0)
return ret;
goto err_free;

ret = zynqmp_dp_reset(dp, false);
if (ret < 0)
Expand Down

0 comments on commit 6b2da5b

Please sign in to comment.