Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1489967lqo; Sun, 12 May 2024 05:07:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFJ3J5lx2QuiVcXSBUU9hq/omjpQ9In3ZZYuLFkb2fQgZOBaQ7fb17irYEEQ40XoM8gX4dgOtW6UZbBstMOg2ILhasa8V3tPkfzieVbw== X-Google-Smtp-Source: AGHT+IEtltwc/IBvwI2QAmr6n3WDInUbqzMVcfuby+0Av09nqCR2yvRi7AM86gBnJQtbpVLL6gW8 X-Received: by 2002:a05:6a00:1307:b0:6ed:1c7:8c5d with SMTP id d2e1a72fcca58-6f4e02837e6mr8280831b3a.12.1715515652044; Sun, 12 May 2024 05:07:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715515652; cv=pass; d=google.com; s=arc-20160816; b=QB9bkpkSRDSE+itCI6AG5q8ITQkxcbpDFuaRNi2ho8dDeIPqCKCrJc0w6KDw9ODa/L PI1rTgbleFDYW7A6EUrco6Hzp5bOjbRScf3L5at8YmFmkZuFBPf22+9UcttJnR0QEW0E 5No55ojPvyrwtI0sJ7aJlqO3SBhPPR6cp2t4VR8Sbn5Aa0+5dwWdxc7cn6MLa0X+pazJ pySq7VChT6BtYWFSybySN9bE54mvvi5e1oemM2OmqyphCQNL31iWiIh7kseUQUIXp+Ux FpJTWjQyJRov4GKl9rpsk2Z9AMzM4SAHsh25oB+GFY1c7ER017ade+lD6UsQAqQbXMoD KLSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=sLjM0W4bumBaAwimCNv4eHwbzksk7qMmM5mV5g8Heas=; fh=ULxNTxaaQIEX8Y9ih2rqqI9Lxn2bbvdaV8tkS1+QGD8=; b=S1MwTh/KeJZLEgV/yxXHYDbKp9Voj41W+Kl1bJIQ6fQhs7MgSZVnRXerGLNx5S0Mk9 1IQU/aBbrKUpQPz20k+5tSFbzQOk4ATGp+3Xt/gsAzXaVufoe4/48hY6A4ASl0hwKX5l mfntGkWfBac/h7mvcL5be14BX1MjGKUVWWeWssXnUoxjLOsVP4p0MgvFejRFruWDZwPh Og3cUvWBh0AZk2005ztZMBI/Hb6Yt+D/efx0Im2wqgUp1RLyLoZxPkXwRLOTRYsHE2Uh xx4kJIfjX2uaMuIWpLxJzsf/R50oZofKxMV7pYxElcMhXS5AGlPW/RxlFeBS3oRUdZW0 736w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qOr9SS8n; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a6dbd7si7529802b3a.31.2024.05.12.05.07.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 05:07:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qOr9SS8n; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-176866-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176866-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C0ED6B20CEA for ; Sun, 12 May 2024 12:07:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B6AF20B33; Sun, 12 May 2024 12:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qOr9SS8n" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90987200C1; Sun, 12 May 2024 12:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715515640; cv=none; b=cObU8pRQ5j10HuqgFyDE0uMZHIVOaKxUrF3nORv765+rT+UODyLEFPaZMdJPGyFd5Conj4zCMf9xb4y8Z1e80d5rhPqZNDak+a2RXUSF6OGZrlicRYONqtGrmYMolYwlfaky2aS47Ko2Zshymg2k3OW5OytueVFfvQkJeWRB0eI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715515640; c=relaxed/simple; bh=H9fooofH8v7EdNtnyTSlW47/IHPiUXxb224cVnj5tck=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sc8/IBObXljGJGPqUSirqoBgNRC+AIzUcFbB16nixLQbSsLOLNLxSRmnTfZg5UXckChtPcK2+PfhNFdlmDYQvJE4u6tqBiMSUoD5QVRN8HfFDGjE4wcWvvZa0taOkMYRLs1Ctc1xBwMkafF91PKd4G9X4dBBu8rbXC61Dr9FLIE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qOr9SS8n; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 993CCC116B1; Sun, 12 May 2024 12:07:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715515640; bh=H9fooofH8v7EdNtnyTSlW47/IHPiUXxb224cVnj5tck=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qOr9SS8n+16sJFjXJ46njugvpIr03iQvp+pRFgSx92ekyfLMbUAj442IPDcRyq9dN 6+Ucvq+QxdVzwaV/n2UH3NSpqKcWsDNb8WnJhi9vdEQfc8hODL/zpFBpJTqu2ApgPQ 0WEhXprBqvDj/W1S2dHJ4cPjg0iwoZcagIHxK25NJPdXctO5dL1HVp7Mjf0GJjC/wf j6WwJRkp/p9WM1o7JZzkWKEe4W8f6EUcWP0tQjE0zG1xQjNk137Syw7qF/jJ4dCnRD b5ocVlOeShejr30p+PrD9ZwJTkNiF7lZQnmvzQLYPNSGbAZ24rrT4AEIjKM8Jwemvt 7BbIgujxHSAsw== Date: Sun, 12 May 2024 13:07:06 +0100 From: Jonathan Cameron To: Vasileios Amoiridis Cc: lars@metafoo.de, andriy.shevchenko@linux.intel.com, ang.iglesiasg@gmail.com, mazziesaccount@gmail.com, ak@it-klinger.de, petre.rodan@subdimension.ro, phil@raspberrypi.com, 579lpy@gmail.com, linus.walleij@linaro.org, semen.protsenko@linaro.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/9] iio: pressure: bmp280: Remove dead error checks Message-ID: <20240512130706.6a86c870@jic23-huawei> In-Reply-To: <20240508165207.145554-2-vassilisamir@gmail.com> References: <20240508165207.145554-1-vassilisamir@gmail.com> <20240508165207.145554-2-vassilisamir@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 8 May 2024 18:51:59 +0200 Vasileios Amoiridis wrote: > The ret value is being checked already in all the previous > paths which exit in case of error, so this path can never > become true. > > Signed-off-by: Vasileios Amoiridis Applied to the togreg branch of iio.git, but only initially pushed out as testing because I'll be rebasing that branch on 6.10-rc1 in about 2 weeks time. Jonathan > --- > drivers/iio/pressure/bmp280-core.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c > index ed49e0779d41..311a011604da 100644 > --- a/drivers/iio/pressure/bmp280-core.c > +++ b/drivers/iio/pressure/bmp280-core.c > @@ -1350,10 +1350,6 @@ static int bmp580_nvm_operation(struct bmp280_data *data, bool is_write) > poll = 50; > timeout = 400; > } > - if (ret) { > - dev_err(data->dev, "failed to write command sequence\n"); > - return -EIO; > - } > > /* Wait until NVM is ready again */ > ret = regmap_read_poll_timeout(data->regmap, BMP580_REG_STATUS, reg, > > base-commit: dccb07f2914cdab2ac3a5b6c98406f765acab803 > prerequisite-patch-id: 97b99b1106cbfd65cef8d256e4dc1a3a9257511e > prerequisite-patch-id: c60e8ef6fae62417c3430b7598b1a3d2a551be79 > prerequisite-patch-id: 6a49484a6d154ddcd1b45b71a6be2c3542ae0be6 > prerequisite-patch-id: 5aae62fa92c719fb65a8701ec4e1c4284bef7fd9 > prerequisite-patch-id: 6943297d5f70f74bfcf5d5b26198423e428773d9