Commit 79a3908d authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Helge Deller

fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()

If 'mipid_detect()' fails, we must free 'md' to avoid a memory leak.

Fixes: 66d2f99d ("omapfb: add support for MIPI-DCS compatible LCDs")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 9561de3a
......@@ -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 void mipid_spi_remove(struct spi_device *spi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment