mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
fbdev: imsttfb: Fix error path of imsttfb_probe()
[ Upstream commit 518ecb6a20 ]
Release ressources when init_imstt() returns failure.
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: aba6ab57a910 ("fbdev: imsttfb: fix a resource leak in probe")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
30959f9f45
commit
3648582181
@@ -1525,8 +1525,10 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
goto error;
|
||||
info->pseudo_palette = par->palette;
|
||||
ret = init_imstt(info);
|
||||
if (!ret)
|
||||
pci_set_drvdata(pdev, info);
|
||||
if (ret)
|
||||
goto error;
|
||||
|
||||
pci_set_drvdata(pdev, info);
|
||||
return ret;
|
||||
|
||||
error:
|
||||
|
||||
Reference in New Issue
Block a user