fbdev: imsttfb: Fix error path of imsttfb_probe()

Release ressources when init_imstt() returns failure.

Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Helge Deller 2023-05-27 11:37:29 +02:00
parent 5cf9a090a3
commit 518ecb6a20

View File

@ -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: