Re: [PATCH 8/8] fbdev: ssd1307fb: Turn off display on driver unload.
From: Maxime Ripard
Date: Sat Feb 07 2015 - 06:50:25 EST
On Fri, Feb 06, 2015 at 11:28:14PM +0100, niederp@xxxxxxxxxxxxxxxx wrote:
> From: Thomas Niederprüm <niederp@xxxxxxxxxxxxxxxx>
>
A commit log is always nice :)
> Signed-off-by: Thomas Niederprüm <niederp@xxxxxxxxxxxxxxxx>
> ---
> drivers/video/fbdev/ssd1307fb.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 02931c7..be91dfc 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -762,6 +762,11 @@ static int ssd1307fb_remove(struct i2c_client *client)
> {
> struct fb_info *info = i2c_get_clientdata(client);
> struct ssd1307fb_par *par = info->par;
> + int ret = 0;
> +
> + ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_OFF);
> + if (ret < 0)
> + return ret;
I don't think we really care about the return value here.
It might be even worse actually, since you'll end up in a intermediate
state, where you won't have freed everything, but your remove method
has been called still.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Attachment:
signature.asc
Description: Digital signature