Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8955387imu; Tue, 4 Dec 2018 17:50:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/V7VhBu0c1UNy2S56U3yup1KKsyMJdmSg5V7RAzmHnUYe65H44mTMbaUvNuglmEnCaZRQcU X-Received: by 2002:a17:902:4324:: with SMTP id i33mr15649448pld.227.1543974631813; Tue, 04 Dec 2018 17:50:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543974631; cv=none; d=google.com; s=arc-20160816; b=eBJF5NGoSD9KQMcqQ93w93TccWh52N04R9jk6XiB8N1c/as+3QTamuWcsIg1v/YUta aSR7gZMP4lHY8H8mUtXomZivtGpHI+PuiPOmHzl6t6SM7SNQYogh5l8CScjuQkOPLyXb ifGMH1GTyXxGRyCgMG9BKMn7+XuM6GxNZkSRRfadrKHvvjadykB1XRqnEiNcu/rPwDXk 6xzWexJ/xpJOKEdV3t1cH3YrSb9c4YGZF0E86Y9jISAqy0BVO4IKMEHB0wYCmbyoyQYy o48vEbr49rtsvAuTx48qF+Lk1lO3Yz8Hix57iKD7xj2ePANEw6PO0YZcF8cIc74OBtC/ +cYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=2lh/8f/pnGj9DsItEKtdeExqEW4yKIG/NAVPJWqQXwo=; b=tvi9Wx0jk7u/0i1RS23XiWcprXpYg98KDcw5sEJXCqeP5ubbQS74pwf0no180qb00m bbARnE/djooTjWXf/IlboSkg7isRjfX7NpWdUDSACopf/mR9VfyJqO0rLpmTXD/0wyfk NOeQNVL/V3d7j45W+PF6qrWoxIDSBoxWgXSEbNEvg23hYKrvi7TzGqSmO/3Q0/t4LAiY 7LG/2kp+9GbiL5pmULAMZ0PnyCWqroDkZFGXBE3Qu3SdjjLCPmF8qJOfmqHpbXGTLGsT rdvYGQdUyV2DDBtVChkPbqCeBRFkiRMjKAPzr4ACCiz0/80AHEh1bZb1M445DSYVaCyH 16KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JKCYG3gY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2si18895719pfi.125.2018.12.04.17.50.16; Tue, 04 Dec 2018 17:50:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JKCYG3gY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726092AbeLEBtc (ORCPT + 99 others); Tue, 4 Dec 2018 20:49:32 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:32851 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbeLEBtc (ORCPT ); Tue, 4 Dec 2018 20:49:32 -0500 Received: by mail-it1-f196.google.com with SMTP id m8so12884244itk.0; Tue, 04 Dec 2018 17:49:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2lh/8f/pnGj9DsItEKtdeExqEW4yKIG/NAVPJWqQXwo=; b=JKCYG3gY0+bgAkBaxd8v/5YlWd4nxjjXTrhsOcopfqcDX8bRT65vYWWVbrC1RfykPe Y1y35SP2y7zyIbwaH/k1JsmyQ924MwJRRiPCwfz0il18suFiZd+Zke3HcPZnoANrz9ud nVmEozSupCiVM5nqw2bQ51uLMfGRClmSjlwQXdu9A8dA25FZILtszsaSO+XJ1OBMZNBk TAYFrlKaU+k5ZWV8megIHgzDymKtJqOpVqWrN9k98DKuLGDnRsQBGjaPp13J7FHNJm7i RdI6/oJg9njFcHmWiPV0vrEZ6uhhEDVSfIvN5R8u34qyBuQicDu+bVouacNd2bX5YZKp te3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2lh/8f/pnGj9DsItEKtdeExqEW4yKIG/NAVPJWqQXwo=; b=Ciu1uHq/SvOPbVhSOiUAho+IcJ+DinhT9zuvNmTBq96M3IWRkxGvy5gZPocEab8FFK XjDxb9IaSkuC3ZalxLQtCmcIUP+7xGCQolt1vjGGOGSThELtqJPl1dCz43Dh8cUPlDSi EPgxmF6g1hbSRT9LO5FwK/2OSNwGnuFjJ27Z+ng3lnENu6QtqAvThb3Q9PePxEoXgCLv 2NywtR9iEWVEu6nRyzc7MXZ6HnfQc/kD+rWD4pzjhFNyOyPjedezCfBUDw8Fendl/nuJ Fe6D0CkdApgeqGr5pPCPVikYDR/PGe85hD++0r42zJA+g+rFSI0C+hSim1kpXt3tx8M4 MkdA== X-Gm-Message-State: AA+aEWb7U9bhIU1Rlbygs68MtH1jykC3/fnlaGUroPx9lQf/b9tj7FPK eTHcIl69JIJOes2FztiPaV0= X-Received: by 2002:a02:bb9a:: with SMTP id g26mr20338004jan.44.1543974571181; Tue, 04 Dec 2018 17:49:31 -0800 (PST) Received: from r2700x.localdomain (c-75-70-96-103.hsd1.co.comcast.net. [75.70.96.103]) by smtp.gmail.com with ESMTPSA id l11sm7552412iob.24.2018.12.04.17.49.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 17:49:30 -0800 (PST) From: Jeremy Fertic To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: lars@metafoo.de, Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jeremy Fertic Subject: [PATCH] Revert "Staging: iio: adt7316: Add an extra check for 'ret' equals to 0" Date: Tue, 4 Dec 2018 18:49:00 -0700 Message-Id: <20181205014900.4827-1-jeremyfertic@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 00426e99789357dbff7e719a092ce36a3ce49d94. i2c_smbus_read_byte() returns 0 when a byte with the value 0 is read from the device. This is a valid read so revert the check for 0. Signed-off-by: Jeremy Fertic --- drivers/staging/iio/addac/adt7316-i2c.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c index ac91163656b5..2d51bd425662 100644 --- a/drivers/staging/iio/addac/adt7316-i2c.c +++ b/drivers/staging/iio/addac/adt7316-i2c.c @@ -30,10 +30,6 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data) } ret = i2c_smbus_read_byte(client); - - if (!ret) - return -EIO; - if (ret < 0) { dev_err(&cl->dev, "I2C read error\n"); return ret; -- 2.19.1