diff options
author | Helge Deller <deller@gmx.de> | 2023-05-27 11:37:29 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-05-27 19:14:26 +0200 |
commit | 518ecb6a209f6ff678aeadf9f2bf870c0982ca85 (patch) | |
tree | 0f8cde8452d53f01d1332e987ed3c5ceeaa22576 | |
parent | fbdev: imsttfb: Release framebuffer and dealloc cmap on error path (diff) | |
download | linux-518ecb6a209f6ff678aeadf9f2bf870c0982ca85.tar.xz linux-518ecb6a209f6ff678aeadf9f2bf870c0982ca85.zip |
fbdev: imsttfb: Fix error path of imsttfb_probe()
Release ressources when init_imstt() returns failure.
Signed-off-by: Helge Deller <deller@gmx.de>
-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 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: |