From patchwork Fri Sep 6 11:33:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 273154 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-ie0-x23d.google.com (mail-ie0-x23d.google.com [IPv6:2607:f8b0:4001:c03::23d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2B67C2C0100 for ; Fri, 6 Sep 2013 21:51:41 +1000 (EST) Received: by mail-ie0-f189.google.com with SMTP id u16sf663057iet.26 for ; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=AsMHrppEDsYFAmpyAnKRVi6IOOeMTdQV5KJhclS2vKE=; b=gqhWMnZAKxdqKj/R5GzpMZaU3X5fnbZnLMP6Wyz0Z38HmjKs45kMpPHKk+HOQVT5TO q5tFEd2sa+MUrj1Or84QTWwnyVIyyBdOYjfEo6JvudHC8V7XGPQLbUA3ivfbmYk6Y0Ky P8cqf/Go5ASfy90XBNKRD5jkE2RqztNZNO2mdFPdARXMQyaPPt4A9wkJ0UG0lVHbd05H SzeijAy35CA3Q7t/7rAgf8yZNCPY8cRithO9zN7UkCIurWSPBA8V/2lQtSd9zuRw+UT5 M1Q3uSQJILc8CIJjMfZoh+hOwKGOVZfpr04KdTxcavz8zt9CTVWrlY2lvmcpQJFPgi4w NgEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=AsMHrppEDsYFAmpyAnKRVi6IOOeMTdQV5KJhclS2vKE=; b=fckbg0XceSAk7FyMrwSotnJecUoFTzXhbX1RBW4CcX0zkALk1V/59ceiLQzbeQhHjJ 4AQYJeNu6oCPaqN7H+Ipr09bRuvuDqhcA7AxfpQf5P/W2LspNRvQ5iccQb0lHQVAGOhl MvsXuAGPVf/f3g+gIDopyVSYI0HJfaNXZZzHSY95l52g+gvnSdeg7VqOAR/jdQsfp/z1 WWJANVZqDZf/7yJoiJRveQl8nrduKWDktrbJ9jpKaQOVCO12W/85RIKLtNEwe1qOtCd6 Fthct+8mvElEExRqkt0WAz+whVnhvKMhZyNuMBRzERhWsOJ9gvMUTRuOhbSNWI4KQ5LF m6Ww== X-Received: by 10.50.39.78 with SMTP id n14mr86688igk.14.1378468299842; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.154.36 with SMTP id vl4ls425437igb.33.canary; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) X-Received: by 10.67.2.41 with SMTP id bl9mr1002404pad.16.1378468299361; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by gmr-mx.google.com with ESMTPS id ax8si356348pbd.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 04:51:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.54; Received: by mail-pb0-f54.google.com with SMTP id ro12so3123422pbb.41 for ; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) X-Gm-Message-State: ALoCoQkhbL38nuh0n+gAAeRzTpFNuZPdDMu+MM+dyix4PuWaEp/5e+Keg7PxFJXQnAMJ3PZDmvhZ X-Received: by 10.68.254.105 with SMTP id ah9mr2433686pbd.87.1378468299238; Fri, 06 Sep 2013 04:51:39 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id q1sm3323153pbd.12.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Sep 2013 04:51:38 -0700 (PDT) From: Sachin Kamat To: rtc-linux@googlegroups.com Cc: a.zummo@towertech.it, akpm@linux-foundation.org, sachin.kamat@linaro.org, Herbert Valerio Riedel Subject: [rtc-linux] [PATCH 02/10] drivers/rtc/rtc-isl1208.c: Remove redundant checks Date: Fri, 6 Sep 2013 17:03:35 +0530 Message-Id: <1378467223-26231-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1378467223-26231-1-git-send-email-sachin.kamat@linaro.org> References: <1378467223-26231-1-git-send-email-sachin.kamat@linaro.org> X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , i2c_smbus_read_byte_data() returns negative errno on failure. Return the value obtained from it directly. Signed-off-by: Sachin Kamat Cc: Herbert Valerio Riedel --- drivers/rtc/rtc-isl1208.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index c016ad8..5a0bf7c 100644 --- a/drivers/rtc/rtc-isl1208.c +++ b/drivers/rtc/rtc-isl1208.c @@ -144,11 +144,7 @@ isl1208_i2c_validate_client(struct i2c_client *client) static int isl1208_i2c_get_sr(struct i2c_client *client) { - int sr = i2c_smbus_read_byte_data(client, ISL1208_REG_SR); - if (sr < 0) - return -EIO; - - return sr; + return i2c_smbus_read_byte_data(client, ISL1208_REG_SR); } static int