Message ID | 86def134-9537-4939-912e-3a424e3a75b6@moroto.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: xlnx: db: fix a memory leak in probe | expand |
On 04/04/2024 10:32, Dan Carpenter wrote: > Free "dp" before returning. > > Fixes: be318d01a903 ("drm: xlnx: dp: Reset DisplayPort IP") > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> > --- > drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c > index 5a40aa1d4283..8a15d18a65a6 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c > @@ -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) Thanks, applying to drm-misc-next. Tomi
diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xlnx/zynqmp_dp.c index 5a40aa1d4283..8a15d18a65a6 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_dp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_dp.c @@ -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)
Free "dp" before returning. Fixes: be318d01a903 ("drm: xlnx: dp: Reset DisplayPort IP") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)