[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B504EF.4000809@ti.com>
Date: Tue, 13 Jan 2015 13:43:43 +0200
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>,
LFBDEV <linux-fbdev@...r.kernel.org>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Maxime Ripard <maxime.ripard@...e-electrons.com>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] fbdev: ssd1307fb: check return value while setting
offset
On 08/01/15 10:17, Lad, Prabhakar wrote:
> this patch checks the return value of write command while
> setting the display offset.
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@...il.com>
> ---
> drivers/video/fbdev/ssd1307fb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 70e3ce8..a7ecaa6 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -342,7 +342,7 @@ static int ssd1307fb_ssd1306_init(struct ssd1307fb_par *par)
>
> /* set display offset value */
> ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_DISPLAY_OFFSET);
> - ret = ssd1307fb_write_cmd(par->client, 0x20);
> + ret = ret & ssd1307fb_write_cmd(par->client, 0x20);
> if (ret < 0)
> return ret;
Hrm, what's that supposed to do? If both calls to ssd1307fb_write_cmd()
return an error, they are anded, resulting in a garbage error code...
Tomi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists