summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap/lcd_mipid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/omap/lcd_mipid.c')
-rw-r--r--drivers/video/fbdev/omap/lcd_mipid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c
index e3a85432f..5730355ee 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -576,11 +576,15 @@ static int mipid_spi_probe(struct spi_device *spi)
r = mipid_detect(md);
if (r < 0)
- return r;
+ goto free_md;
omapfb_register_panel(&md->panel);
return 0;
+
+free_md:
+ kfree(md);
+ return r;
}
static int mipid_spi_remove(struct spi_device *spi)