Message ID | 20230527093901.487483-1-deller@gmx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fbdev: imsttfb: Fix error path of imsttfb_probe() | expand |
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:
Release ressources when init_imstt() returns failure. Signed-off-by: Helge Deller <deller@gmx.de> --- drivers/video/fbdev/imsttfb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.40.1