diff options
author | Helge Deller | 2023-05-27 11:37:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-11-20 11:52:18 +0100 |
commit | 9858458282200cb64222b4ced795329b7b4f8671 (patch) | |
tree | 1cc2a82749b4a0a5a28f1abee363aafd150923db /drivers | |
parent | 6d53668c438b3aa56146d03df30bcb23443b10db (diff) |
fbdev: imsttfb: Fix error path of imsttfb_probe()
[ Upstream commit 518ecb6a209f6ff678aeadf9f2bf870c0982ca85 ]
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/imsttfb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c index e6adb2890ecf..004e7da9e70b 100644 --- a/drivers/video/fbdev/imsttfb.c +++ b/drivers/video/fbdev/imsttfb.c @@ -1531,8 +1531,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: |