summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-05-27 12:37:29 +0300
committerHelge Deller <deller@gmx.de>2023-05-27 20:14:26 +0300
commit518ecb6a209f6ff678aeadf9f2bf870c0982ca85 (patch)
tree0f8cde8452d53f01d1332e987ed3c5ceeaa22576 /drivers/video
parent5cf9a090a39c97f4506b7b53739d469b1c05a7e9 (diff)
downloadlinux-518ecb6a209f6ff678aeadf9f2bf870c0982ca85.tar.xz
fbdev: imsttfb: Fix error path of imsttfb_probe()
Release ressources when init_imstt() returns failure. Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/imsttfb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
index 075f11991281..ee7d01ad1406 100644
--- a/drivers/video/fbdev/imsttfb.c
+++ b/drivers/video/fbdev/imsttfb.c
@@ -1535,8 +1535,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: