lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150114110711.GP4891@lukather>
Date:	Wed, 14 Jan 2015 12:07:11 +0100
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	"Lad, Prabhakar" <prabhakar.csengg@...il.com>
Cc:	LFBDEV <linux-fbdev@...r.kernel.org>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fbdev: ssd1307fb: return proper error code if write
 command fails

Hi,

Thanks for doing this,

On Wed, Jan 14, 2015 at 08:24:49AM +0000, Lad, Prabhakar wrote:
> this patch fixes ssd1307fb_ssd1306_init() function to return
> proper error codes in case of failures.
> 
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
> ---
>  drivers/video/fbdev/ssd1307fb.c | 54 ++++++++++++++++++++++++++++++-----------
>  1 file changed, 40 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index f4daa59..528ea16 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -320,7 +320,9 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
>  
>  	/* Set initial contrast */
>  	ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CONTRAST);
> -	ret = ret & ssd1307fb_write_cmd(par->client, 0x7f);
> +	if (ret < 0)
> +		return ret;

A newline here (and to all the subsequent changes) would be great.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ