From patchwork Tue Nov 20 09:59:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12978 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 94EEB23DFE for ; Tue, 20 Nov 2012 10:05:16 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3C99AA19B1A for ; Tue, 20 Nov 2012 10:05:16 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7894187iej.11 for ; Tue, 20 Nov 2012 02:05:15 -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:x-gm-message-state; bh=z6y01OvlpdyztMa7YOc9FzuDMkXxN4d93S22a4xmf+M=; b=IOAA2j0vclHur45p9ZkKAcZ+HzgeLUM9cxYWMObjvpp3t+t2VOe/gMTzzk+Qtr6Kn6 Wse7SHGU/VMZYXJghuMT9ZhNabTPmaEpKyHB0b+3/vo7LJA75oWxaLGOzp8cjhRaaEA7 RGTYZo9DJ0DKYOlUmTLWQPrfocesy8K+JDF6RB9rhIySRn1sjf5L5QVN4/FLfRJdhLnX DTHKe82j+VvdW/FVOQIZVe/dHuS9F8rmHwDUf393TPaPjYr7Vg3NiH6QGE75zIzDDatm NMejsmDLVT6WjVhQKypH/CztIe7YzMZfU0OyfTILpr1V/WZ1G2PCZtarhNHHx45E8RQ2 6TIw== Received: by 10.50.152.137 with SMTP id uy9mr9270023igb.62.1353405915633; Tue, 20 Nov 2012 02:05:15 -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 n20csp294556igt; Tue, 20 Nov 2012 02:05:15 -0800 (PST) Received: by 10.68.211.42 with SMTP id mz10mr41852789pbc.100.1353405914670; Tue, 20 Nov 2012 02:05:14 -0800 (PST) Received: from mail-da0-f50.google.com (mail-da0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id w3si14707774pbz.168.2012.11.20.02.05.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 02:05:14 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 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-da0-f50.google.com with SMTP id z20so2388933dae.9 for ; Tue, 20 Nov 2012 02:05:14 -0800 (PST) Received: by 10.68.137.41 with SMTP id qf9mr47113337pbb.103.1353405914118; Tue, 20 Nov 2012 02:05:14 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id s1sm7841420paz.0.2012.11.20.02.05.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Nov 2012 02:05:13 -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 1/3] leds: lp5521: Fix return value Date: Tue, 20 Nov 2012 15:29:00 +0530 Message-Id: <1353405542-24702-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmofdrhZ8dDhilDmWdYUeKYrUEcCYelF/3J/VaUY8yFdg+S4eK3t81mf+P2xuCKu2UTfdIT Return the value obtained from i2c_smbus_read_byte_data() instead of -EIO. Silences the following smatch warning: drivers/leds/leds-lp5521.c:155 lp5521_read() info: why not propagate 'ret' from i2c_smbus_read_byte_data() instead of -5? Signed-off-by: Sachin Kamat --- drivers/leds/leds-lp5521.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 2064aef..64d6dcf 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -152,7 +152,7 @@ static int lp5521_read(struct i2c_client *client, u8 reg, u8 *buf) ret = i2c_smbus_read_byte_data(client, reg); if (ret < 0) - return -EIO; + return ret; *buf = ret; return 0;