Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758597AbbBGQq5 (ORCPT ); Sat, 7 Feb 2015 11:46:57 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:36759 "EHLO mailgw1.uni-kl.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755689AbbBGQqz convert rfc822-to-8bit (ORCPT ); Sat, 7 Feb 2015 11:46:55 -0500 Date: Sat, 7 Feb 2015 17:49:31 +0100 From: Thomas =?UTF-8?B?TmllZGVycHLDvG0=?= To: Maxime Ripard Cc: linux-fbdev@vger.kernel.org, plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/8] fbdev: ssd1307fb: Turn off display on driver unload. Message-ID: <20150207174931.0d8a4e79@maestro.intranet> In-Reply-To: <20150207114534.GR2079@lukather> References: <1423261694-5939-1-git-send-email-niederp@physik.uni-kl.de> <1423261694-5939-9-git-send-email-niederp@physik.uni-kl.de> <20150207114534.GR2079@lukather> Organization: TU Kaiserslautern X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 50 Am Sat, 7 Feb 2015 12:45:34 +0100 schrieb Maxime Ripard : > On Fri, Feb 06, 2015 at 11:28:14PM +0100, niederp@physik.uni-kl.de > wrote: > > From: Thomas Niederprüm > > > > A commit log is always nice :) Will be added. > > > Signed-off-by: Thomas Niederprüm > > --- > > 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. I agree. I will remove the check for the return statement. > > Maxime > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/