drm: Fix wrong kfree() in managed resource usage example
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 2 Apr 2020 09:53:25 +0000 (12:53 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 2 Apr 2020 11:04:57 +0000 (13:04 +0200)
The example code showing how to use the managed resource API calls
kfree() on the wrong pointer. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200402095325.5266-1-laurent.pinchart+renesas@ideasonboard.com
drivers/gpu/drm/drm_drv.c

index 7dad7813fca1e25f2b9c685cfb758ea3dbd431ac..c15c9b4540e1c3bf474a61798eb15f8f297dd50d 100644 (file)
@@ -305,7 +305,7 @@ void drm_minor_release(struct drm_minor *minor)
  *
  *             ret = devm_drm_dev_init(&pdev->dev, drm, &driver_drm_driver);
  *             if (ret) {
- *                     kfree(drm);
+ *                     kfree(priv);
  *                     return ret;
  *             }
  *             drmm_add_final_kfree(drm, priv);