Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp59400lqp; Sun, 9 Jun 2024 16:40:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8h3iCV8Orc0zHxG9iHGP0kfsvxo09xqK/thBUAMZxlCQfsWCu0tkXx81rMAB8ILv4A3ffrEygsEaXlmeH3LPumPoFdvbgzTYnOOufkQ== X-Google-Smtp-Source: AGHT+IEOeQ5Sicr0zXoyxVShMDEC0XZr294SkYTCaHa17XDQITyjEeDE+cE4JHLIB9jyqMgiXR8H X-Received: by 2002:a05:620a:1a89:b0:797:8fce:6d7c with SMTP id af79cd13be357-7978fce71camr6822085a.36.1717976447971; Sun, 09 Jun 2024 16:40:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717976447; cv=pass; d=google.com; s=arc-20160816; b=E+7vl+w17YeDsEHSDJa6gGE5mt77MumNOXy8J9HRJGEcTQQkEtMaFEvXY9wHOjf32E enRseX7ta38bjvtox48NQKOHs0CHNAwbw2u02dUqsldc6y2N5W9Bgp34OS8N2gs2e+cZ nHNkdxZSUZTF5COmVVHe8PqWURMpdKD4xn/p6zENA62Nu6pYrbT7Td1bupJ3IYcF+Q9O 5zm815lyTbz3AwBxBLDYk1pr9MSKACdp0Y1qnOW/br1KFDMJqWr1bJJ2K2y3D7aooaJY iDc/Jg05LIN6XbliBrc9Wgvg2xCFm5Y8PPZfjjnqrpCL5d0B3KPGpxgdifvqEHQ5MIK6 dEsw== 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 :date:subject:cc:to:from:dkim-signature; bh=xsbnqsAhFK7wuZ2DJC+e/vk6WotV4BxUYJD8eztjyM4=; fh=eu0tjGXN342dEopr12BVLpmRVe+uEMPc2U1dAD8LBdI=; b=FrGgj+fzFhy0SIRD1imXKGw+adlpSEoLIjs7ixcYWnGJWxd6Ma21mp0e+NKBqGjd6h +fc4pZ0nIz18TRRKl49oMPytkIOiwHBJ0J9BwAYeWD9CDgykkwTnHYyi0cdX7ckHNjs6 OA+FMitDk/FsAXe2/x/+2vjWwNiAh2+K09RpLQf09jfUBgbRGljzBAcP2GMMCOoPj0YS xk4goIbiKlsdz+zWwYSUly0yxByAZ4aVghWhgKf88xoANVWcXOV8psC67F8LL7DrzCEP 2wIvXdRKIDsKJhLrLLNgdip58eW9a3h6kPnL/POcFdtdQ7Je+KhTcbx8edb2ip5OXjob gktg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NkF2fHIY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-7974cce740csi54726285a.656.2024.06.09.16.40.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 16:40:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=NkF2fHIY; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207549-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207549-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A9FC21C209A6 for ; Sun, 9 Jun 2024 23:40:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA3A555886; Sun, 9 Jun 2024 23:38:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NkF2fHIY" Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D91D74410; Sun, 9 Jun 2024 23:38:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717976325; cv=none; b=aRH1l6KC06nW4yPUPIFaxownGP4GY4qZaoX7c/JUhzSujeX7kYkr55EamoqRY57eyOj8EdSC6mgBSXAdU0RJc3CiwKiimBeAK34I1aR4scRXJlJSAq+N782DTQTI+fG6age2R81a4bZDRid8qUg3TO9utJFdMsYjKbhcDNBLWyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717976325; c=relaxed/simple; bh=Z5vCLOtayG12+oURNPul0+eUnfkY1Ez/Lqwna0p6jj0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UDMCwVP/xyKn2RRz/7I95rnbmJR84sJAs/Bzc5zonUZYvZcH8QIkAIA/0D52efh0Qf4lFtJPuW/axwEjfYtmDpESOlspb6eVRHqFnTq+P70FF/ece7Zop0pkEegSU6s6tekN6I/sWz7j5iiuaETykinARGruZKZHREvDzVymyuE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NkF2fHIY; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a6f1c4800easo59288166b.3; Sun, 09 Jun 2024 16:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717976322; x=1718581122; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xsbnqsAhFK7wuZ2DJC+e/vk6WotV4BxUYJD8eztjyM4=; b=NkF2fHIYjGhV3XlRsGWF/pMiyBBGk6VGurdyQoGQ5u2rPkyJLq8V6bxmZAl967JT/H r/mpgb7LQq8EkkJOBu4gtdDIKJ74vCSij/9SKRhOX5ZZNe3Xw7OAKcUjzWB6Sl0ycD6m ONO+DuxafGnLY1xCbQ5N5ywgnjaUGz2La2KjVNmzNDQa7Jxv/HojdlykNTmSVZ+vl/hq dokhYo3T+b8T55kXRimsPm3kJXTd8FgP0S6cpYT/ZnVEjKmQ7qtyC5IFoJYH8aNsRZxQ o97Yk3SQiJSTnoMPie3kkg06XHJIMWaKb0lILGr6vNRjj0iIUcVgCrSyKYPLRflvwUp8 HVRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717976322; x=1718581122; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xsbnqsAhFK7wuZ2DJC+e/vk6WotV4BxUYJD8eztjyM4=; b=YR+UP1/RE7Qj65ILcrNR7Xmi6tLzO/a3cZlS81vLl8wqomMg4q1eOHYvS/7mKAq1ig RQGAqYNlbcV8yPCYOHL1MBFiKrwnuNEPXS+HTUM6RqVub+wnB9fugzNwC2gVx7jwg7N9 yZ53vs3VyoN2RoATcNi81LhirDyBcaUM4nH6WBNQzpKYEstI17JwLxfzoFLgrGBtw3wf KYqjvdh8f0AxsK/6xJzgsTIm0TGmKS1GSYxNJitW59xTHFyw/kNfVHcD6VfTCFU/aNzW r7UiJsOjPIPpEZU8SDjM6KviIJ6NE/kPPBuNaNAdD77xXDxI2tkKfizpApz6Yzb+soug 6Vbw== X-Forwarded-Encrypted: i=1; AJvYcCU4CrXhwbrdgcHuk31w0fv41TjgLeNyGjmLDkmIbPv92Fj9Kfzv9H87lUdYtlbdxzxZAxhRhJWACyX+zcqZ15FCqQFaRs5C/tbCN/hv42yKcMekMV8t8Y2fkTnhuo0bVygGKMPSwkjx X-Gm-Message-State: AOJu0YzGRk2vIlFs1M3xcGzdMMBYD9cWprFNCVaKjc1utHx9IkGeVFsi qEMy/N4uyulTT7FskQut/FJu/CUrEH87j4MyYS0Rx73XUS3gxFwx X-Received: by 2002:a17:906:25d3:b0:a6f:18ee:7932 with SMTP id a640c23a62f3a-a6f18ee7a35mr115533766b.20.1717976321864; Sun, 09 Jun 2024 16:38:41 -0700 (PDT) Received: from localhost.localdomain ([2a04:ee41:82:7577:635a:738f:880f:9ea5]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f20bb1abesm46063366b.172.2024.06.09.16.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 16:38:41 -0700 (PDT) From: Vasileios Amoiridis To: jic23@kernel.org Cc: dpfrey@gmail.com, himanshujha199640@gmail.com, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, mike.looijmans@topic.nl, vassilisamir@gmail.com Subject: [PATCH v3 10/15] iio: chemical: bme680: Make error checks consistent Date: Mon, 10 Jun 2024 01:38:21 +0200 Message-Id: <20240609233826.330516-11-vassilisamir@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240609233826.330516-1-vassilisamir@gmail.com> References: <20240609233826.330516-1-vassilisamir@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In the majority of the error checks after a regmap_{read,write}() operation the following coding style is used: ret = regmap_{read,write}(data->regmap, ...); if (ret < 0) { dev_err(dev, ...); return ret; } In this particular case it was different so change it for consistency. Signed-off-by: Vasileios Amoiridis --- drivers/iio/chemical/bme680_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 415816a6cc9b..a54460fddc91 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -517,10 +517,12 @@ static int bme680_chip_config(struct bme680_data *data) ret = regmap_write_bits(data->regmap, BME680_REG_CTRL_MEAS, BME680_OSRS_TEMP_MASK | BME680_OSRS_PRESS_MASK, osrs); - if (ret < 0) + if (ret < 0) { dev_err(dev, "failed to write ctrl_meas register\n"); + return ret; + } - return ret; + return 0; } static int bme680_gas_config(struct bme680_data *data) -- 2.25.1