[PATCH] imsttfb: Fix resource leak
The struct info and device resource may not be released in the driver's error path. Fix. Coverity Bug 671 Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
98365f5eb4
commit
91bc89cf98
@@ -1510,6 +1510,8 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
default:
|
default:
|
||||||
printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
|
printk(KERN_INFO "imsttfb: Device 0x%x unknown, "
|
||||||
"contact maintainer.\n", pdev->device);
|
"contact maintainer.\n", pdev->device);
|
||||||
|
release_mem_region(addr, size);
|
||||||
|
framebuffer_release(info);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user