From patchwork Thu Jan 8 08:17:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 5591301 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 583EF9F443 for ; Thu, 8 Jan 2015 08:19:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9EAC120361 for ; Thu, 8 Jan 2015 08:19:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC60E20115 for ; Thu, 8 Jan 2015 08:19:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755937AbbAHISx (ORCPT ); Thu, 8 Jan 2015 03:18:53 -0500 Received: from mail-we0-f181.google.com ([74.125.82.181]:58627 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754005AbbAHISL (ORCPT ); Thu, 8 Jan 2015 03:18:11 -0500 Received: by mail-we0-f181.google.com with SMTP id q58so1087267wes.12; Thu, 08 Jan 2015 00:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EsvxTdxwbADBytvlYdFbsgx3eWY8YxXe+/l85oL06ag=; b=KkWDfsI0OlzGBiwipu3CONf+s2f9OuoP+pI3ZWmsTtXEG7aNAzpaad0SM3iPkpSvoX fLcAe2zXMOjJd6LTjr8zT6rfk9N19IghouqLqqZZKK48FtH4OHtObQAix2uXXKul0oKs 38pwJdjxgyMFB8kR3VgXLlYS6hk8VPqi1ydOibndcdYaSAJ0oDk/xvK0wcW1Fhq1ZWcE sHRtpKm1woHzB2ggc2rfvp0R3FT6KpT8lY1Pfd5fms0enPyXNaoJsvQ3eZGzNhqfr/9c Mf2ZWmHFF2klmB5izNk/pSmeVLCPazH53ImJMNiG6on44OFdDYLKkPKMlGJpZ9RVdQkl fhVQ== X-Received: by 10.194.184.204 with SMTP id ew12mr16593774wjc.85.1420705090220; Thu, 08 Jan 2015 00:18:10 -0800 (PST) Received: from tango-charlie.Home ([94.10.25.115]) by mx.google.com with ESMTPSA id wa5sm5143443wjc.8.2015.01.08.00.18.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 08 Jan 2015 00:18:09 -0800 (PST) From: "Lad, Prabhakar" To: LFBDEV , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Maxime Ripard Cc: LKML , "Lad, Prabhakar" Subject: [PATCH 2/2] fbdev: ssd1307fb: check return value while setting offset Date: Thu, 8 Jan 2015 08:17:59 +0000 Message-Id: <1420705079-3741-3-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420705079-3741-1-git-send-email-prabhakar.csengg@gmail.com> References: <1420705079-3741-1-git-send-email-prabhakar.csengg@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP this patch checks the return value of write command while setting the display offset. Signed-off-by: Lad, Prabhakar Acked-by: Maxime Ripard --- 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;