From patchwork Tue Nov 20 09:59:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12979 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9B3FC23DFE for ; Tue, 20 Nov 2012 10:05:19 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 2E10EA19B1A for ; Tue, 20 Nov 2012 10:05:19 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id t4so1595098iag.11 for ; Tue, 20 Nov 2012 02:05:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=Wm/9WJR9EuhLgDI7pKOV/OX/BKGhaIksqWjQjVhhHqc=; b=o9e4cNA6NHLxgHW3dDFdlX+GZBrOEKKHZjQ7UR4RMEv9h9iVLtxW7/6wvR/jSS/00J ju3JudP4vE4NdH9GjN/sL+U0seLwI4zJ9NtbwkSC7kWJbajPPHhkL8pJHl0fIshO3TuQ QPiE+7BEge9oQajMB6nwNE3JxOfisFAbNNnjjYPN7WZFOH1TS4/haiIDgHcUdE/8fyKU kKsbfY2YyA/hOLNGdctLwxA4TUymoyRzyChXc1/sWvXbKiPRQMeUl14c44HusdyhwI2E 3btbsukJsQcWvt8R3hnsf5Z4tsZ+T/tuLKOlvB/ZLW34DwvWJo8Y5QqMrQBB/F8/+TM/ 1SiQ== Received: by 10.50.213.69 with SMTP id nq5mr9330491igc.70.1353405918637; Tue, 20 Nov 2012 02:05:18 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp294562igt; Tue, 20 Nov 2012 02:05:18 -0800 (PST) Received: by 10.66.88.136 with SMTP id bg8mr6576846pab.54.1353405917907; Tue, 20 Nov 2012 02:05:17 -0800 (PST) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id zz3si17675067pbc.61.2012.11.20.02.05.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 02:05:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.48; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f48.google.com with SMTP id kp12so4183572pab.35 for ; Tue, 20 Nov 2012 02:05:17 -0800 (PST) Received: by 10.68.132.202 with SMTP id ow10mr46642504pbb.139.1353405917655; Tue, 20 Nov 2012 02:05:17 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id s1sm7841420paz.0.2012.11.20.02.05.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 02:05:16 -0800 (PST) From: Sachin Kamat To: linux-leds@vger.kernel.org Cc: cooloney@gmail.com, rpurdie@rpsys.net, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/3] leds: lp5523: Fix return value Date: Tue, 20 Nov 2012 15:29:01 +0530 Message-Id: <1353405542-24702-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353405542-24702-1-git-send-email-sachin.kamat@linaro.org> References: <1353405542-24702-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQknVoPgywF0elM8U5mai0sfJ6PbcVz7mQsc6IhBNNVnWnsK9P1waQ1THqo8/1k7lAP46+EH Return the value obtained from i2c_smbus_read_byte_data() instead of -EIO. Silences the following smatch warning: drivers/leds/leds-lp5523.c:174 lp5523_read() info: why not propagate 'ret' from i2c_smbus_read_byte_data() instead of -5? Signed-off-by: Sachin Kamat --- drivers/leds/leds-lp5523.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 4ddf7b4..56f5435 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -171,7 +171,7 @@ static int lp5523_read(struct i2c_client *client, u8 reg, u8 *buf) s32 ret = i2c_smbus_read_byte_data(client, reg); if (ret < 0) - return -EIO; + return ret; *buf = ret; return 0;