Skip to content

Commit

Permalink
drm/lima/lima_drv: Add missing unwind goto in lima_pdev_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit c5647ca ]

Smatch reports:
drivers/gpu/drm/lima/lima_drv.c:396 lima_pdev_probe() warn:
	missing unwind goto?

Store return value in err and goto 'err_out0' which has
lima_sched_slab_fini() before returning.

Fixes: a1d2a63 ("drm/lima: driver for ARM Mali4xx GPUs")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230314052711.4061652-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
harshimogalapalli authored and gregkh committed May 11, 2023
1 parent 7dc6978 commit 399bf93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/lima/lima_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,10 @@ static int lima_pdev_probe(struct platform_device *pdev)

/* Allocate and initialize the DRM device. */
ddev = drm_dev_alloc(&lima_drm_driver, &pdev->dev);
if (IS_ERR(ddev))
return PTR_ERR(ddev);
if (IS_ERR(ddev)) {
err = PTR_ERR(ddev);
goto err_out0;
}

ddev->dev_private = ldev;
ldev->ddev = ddev;
Expand Down

0 comments on commit 399bf93

Please sign in to comment.