Re: [Bulk] [PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-09 Thread Tony Prisk
On Sun, 2012-12-09 at 19:08 +0100, Julia Lawall wrote: > From: Julia Lawall > > The various devm_ functions allocate memory that is released when a driver > detaches. This patch uses these functions for data that is allocated in > the probe function of a platform device and is only freed in the

[PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-09 Thread Julia Lawall
From: Julia Lawall The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. The patch makes some other cleanups. First, th

Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-09 Thread Tony Prisk
On Sun, 2012-12-09 at 08:21 +0100, Julia Lawall wrote: > > Rather than the goto, add the fail path code in directly, and return. > > > > > > ret = register_framebuffer(&fbi->fb); > > if (ret < 0) { > > dev_err(&pdev->dev, > > "Failed to register framebuffer device: %d\n", ret); > > if (fbi->fb.c

Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-08 Thread Julia Lawall
Rather than the goto, add the fail path code in directly, and return. ret = register_framebuffer(&fbi->fb); if (ret < 0) { dev_err(&pdev->dev, "Failed to register framebuffer device: %d\n", ret); if (fbi->fb.cmap.len) fb_dealloc_cmap(&fbi->fb.cmap); return ret; } So there is no need for

Re: [PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-08 Thread Tony Prisk
On Sat, 2012-12-08 at 17:31 +0100, Julia Lawall wrote: > From: Julia Lawall > > The various devm_ functions allocate memory that is released when a driver > detaches. This patch uses these functions for data that is allocated in > the probe function of a platform device and is only freed in the

[PATCH] drivers/video/wm8505fb.c: use devm_ functions

2012-12-08 Thread Julia Lawall
From: Julia Lawall The various devm_ functions allocate memory that is released when a driver detaches. This patch uses these functions for data that is allocated in the probe function of a platform device and is only freed in the remove function. The patch makes some other cleanups. First, th