From patchwork Wed Feb 15 10:38:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13141511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 829EEC636D4 for ; Wed, 15 Feb 2023 10:39:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yQr2MpHnTl/P66fsHuBBzL2DGqf8tXcJLGSbC+06fCs=; b=F8im3kRILX2msP BQI3/qOBvpvwsJ7X97nD3S8bRDnm31lTqKzPEGq5EWWmH87H4s3SU+JfNh4mcIAYd1+Q92SCcqFVD Bp0IcTPnurpnBN1Hy8/j7Ai46eVNUU+Mz2og2ZTzcfFD5b7zqQskSDpmvhFgRtfYMgwrFpsnKjlvi 3pq7hQS5kwvcw3NmSPZr3+350zN9ccOHHr/Jqxj+ox/npYRfspUEbY0f1OtJ2oLnhTuX1vvvKm0mv GUErAxGz027476DOa+1GtrbiN9I5S42XNU3uzLHnFVTlvBvfNKpnydEb6LDwxJvLS5WciUqEtZAQl +z8budSsIJN+hKTSTRZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSFBB-005TmK-Sy; Wed, 15 Feb 2023 10:38:25 +0000 Received: from smtp-27.smtpout.orange.fr ([80.12.242.27] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSFB8-005TkK-81 for linux-arm-kernel@lists.infradead.org; Wed, 15 Feb 2023 10:38:24 +0000 Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id SFAupWaW35qOuSFAupYXwG; Wed, 15 Feb 2023 11:38:10 +0100 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Wed, 15 Feb 2023 11:38:10 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: Michal Simek Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org Subject: [PATCH] i2c: xiic: Remove some dead code Date: Wed, 15 Feb 2023 11:38:07 +0100 Message-Id: <9d36938de98dc491425a51a9c07367dd9e448e60.1676457464.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230215_023822_461944_6B700826 X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org wait_for_completion_timeout() never returns negative value. Signed-off-by: Christophe JAILLET Reviewed-by: Michal Simek --- drivers/i2c/busses/i2c-xiic.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index 8503b5016aaf..5543f372ae60 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -1038,10 +1038,6 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) i2c->rx_msg = NULL; i2c->nmsgs = 0; err = -ETIMEDOUT; - } else if (err < 0) { /* Completion error */ - i2c->tx_msg = NULL; - i2c->rx_msg = NULL; - i2c->nmsgs = 0; } else { err = (i2c->state == STATE_DONE) ? num : -EIO; }