Skip to content

Commit

Permalink
drm/armada: Fix a potential double free in an error handling path
Browse files Browse the repository at this point in the history
'priv' is a managed resource, so there is no need to free it explicitly or
there will be a double free().

Fixes: 90ad200 ("drm/armada: Use devm_drm_dev_alloc")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c4f3c9207a9fce35cb6dd2cc60e755275961588a.1640536364.git.christophe.jaillet@wanadoo.fr
  • Loading branch information
Christophe JAILLET authored and Daniel Vetter committed Apr 11, 2023
1 parent 6fd33a3 commit b89ce11
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/gpu/drm/armada/armada_drv.c
Original file line number Diff line number Diff line change
@@ -99,7 +99,6 @@ static int armada_drm_bind(struct device *dev)
if (ret) {
dev_err(dev, "[" DRM_NAME ":%s] can't kick out simple-fb: %d\n",
__func__, ret);
kfree(priv);
return ret;
}

0 comments on commit b89ce11

Please sign in to comment.