Message ID | 1301667827-20056-6-git-send-email-julia@diku.dk (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Fri, Apr 1, 2011 at 10:23, Julia Lawall wrote: > Error handling code following a kmalloc should free the allocated data. Acked-by: Mike Frysinger <vapier@gentoo.org> -mike -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Apr 02, 2011 at 01:05:57AM -0400, Mike Frysinger wrote: > On Fri, Apr 1, 2011 at 10:23, Julia Lawall wrote: > > Error handling code following a kmalloc should free the allocated data. > > Acked-by: Mike Frysinger <vapier@gentoo.org> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/video/bfin-lq035q1-fb.c b/drivers/video/bfin-lq035q1-fb.c index c8e1f04..23b6c4b 100644 --- a/drivers/video/bfin-lq035q1-fb.c +++ b/drivers/video/bfin-lq035q1-fb.c @@ -154,8 +154,10 @@ static int __devinit lq035q1_spidev_probe(struct spi_device *spi) ret = lq035q1_control(spi, LQ035_SHUT_CTL, LQ035_ON); ret |= lq035q1_control(spi, LQ035_DRIVER_OUTPUT_CTL, ctl->mode); - if (ret) + if (ret) { + kfree(ctl); return ret; + } spi_set_drvdata(spi, ctl);