video: fbdev: radeon: Fix memleak in radeonfb_pci_register

[ Upstream commit fe6c6a4af2be8c15bac77f7ea160f947c04840d1 ]

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

Fixes: 069ee21a82 ("fbdev: Fix loading of module radeonfb on PowerMac")
Signed-off-by: Dinghao Liu <[email protected]>
Reviewed-by: Mathieu Malaterre <[email protected]>
Cc: Kangjie Lu <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Dinghao Liu 2020-08-25 14:29:00 +08:00 • committed by Greg Kroah-Hartman
commit 23159b4375

View file

@ -2323,7 +2323,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");