aboutsummaryrefslogtreecommitdiffstats
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 a75ae0c9b14c..d1cd8785d011 100644
--- a/drivers/video/fbdev/omap/lcd_mipid.c
+++ b/drivers/video/fbdev/omap/lcd_mipid.c
@@ -563,11 +563,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)