Skip to content

Commit

Permalink
video: fbdev: radeon: Fix memleak in radeonfb_pci_register
Browse files Browse the repository at this point in the history
[ Upstream commit fe6c6a4 ]

When radeon_kick_out_firmware_fb() fails, info should be
freed just like the subsequent error paths.

Fixes: 069ee21 ("fbdev: Fix loading of module radeonfb on PowerMac")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Mathieu Malaterre <malat@debian.org>
Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200825062900.11210-1-dinghao.liu@zju.edu.cn
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
dinghaoliu authored and gregkh committed Oct 29, 2020
1 parent 53d19f4 commit 7a702a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/aty/radeon_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2311,7 +2311,7 @@ static int radeonfb_pci_register(struct pci_dev *pdev,

ret = radeon_kick_out_firmware_fb(pdev);
if (ret)
return ret;
goto err_release_fb;

/* request the mem regions */
ret = pci_request_region(pdev, 0, "radeonfb framebuffer");
Expand Down

0 comments on commit 7a702a8

Please sign in to comment.