[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>

authored by Antonino A. Daplas and committed by Linus Torvalds 91bc89cf 98365f5e

+2
+2
drivers/video/imsttfb.c
··· 1510 default: 1511 printk(KERN_INFO "imsttfb: Device 0x%x unknown, " 1512 "contact maintainer.\n", pdev->device); 1513 return -ENODEV; 1514 } 1515
··· 1510 default: 1511 printk(KERN_INFO "imsttfb: Device 0x%x unknown, " 1512 "contact maintainer.\n", pdev->device); 1513 + release_mem_region(addr, size); 1514 + framebuffer_release(info); 1515 return -ENODEV; 1516 } 1517