Skip to content

Commit 0ddd3bb

Browse files
Yuuoniylinusw
authored andcommitted
drm/pl111: Fix error handling in pl111_amba_probe
Jump to the existing dev_put label when devm_request_irq() fails so drm_dev_put() and of_reserved_mem_device_release() run instead of returning early and leaking resources. Found via static analysis and code review. Fixes: bed4100 ("drm/pl111: Initial drm/kms driver for pl111") Cc: [email protected] Signed-off-by: Miaoqian Lin <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 3fbd976 commit 0ddd3bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/pl111/pl111_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
295295
variant->name, priv);
296296
if (ret != 0) {
297297
dev_err(dev, "%s failed irq %d\n", __func__, ret);
298-
return ret;
298+
goto dev_put;
299299
}
300300

301301
ret = pl111_modeset_init(drm);

0 commit comments

Comments
 (0)