From nobody Wed Feb 11 03:03:27 2026 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (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 2D93E37E2F7 for ; Mon, 9 Feb 2026 15:07:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; cv=none; b=Fjubk/R9EzuCjIukJnh9BMCKLe4sH+7i/NONTE/ggVEb+IvUTyV3cTu2ApjqyF5f8u6iTT6hPBhGO6Ji/GN1NhGn0RLoU94M57eaoKphYIpUYuP86LaoOMxwO+QjOKiLSYaF0uWti8JCxSEYZE7sCZibqNIjxJv9E62zkD5cmGY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770649671; c=relaxed/simple; bh=C7mQCeEr/HdbKguNqig8yEGFQ8i0l7imyEakSsdZ4wU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nGYEB/zrU2vpkCRq06h6+jasdZa2a58A98Nc15clkJ1J8r2GleNO4T+h+dGubGHZDXwj99BILXDo3YcQEIQkcrwvpzvaWalWT1r1Lu+VYbOlUykgRMLaPs1rLmH4SK95+UL3PsInA+1q0zgE/RA3DWDeRkLo5vPN+BeoE+0WAk0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Px7pYXIz; arc=none smtp.client-ip=209.85.208.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Px7pYXIz" Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-658ad86082dso4356446a12.0 for ; Mon, 09 Feb 2026 07:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1770649669; x=1771254469; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XegibK6nZtE74LWspbesvNEx78XvtPq2jMKaE0vnzoI=; b=Px7pYXIzNoRnX6/1nw7mMSYxejRIeX4YBej3uecoRzNR1dyjl0tnSDP+3U3DP3pLiq Q7+gZqG3DjviAJbXJj3tCZiiz4R8KX23Me0cGJfIgOervpu+A+6ilwtdYb89ss1MtEuy NMQ+1pKkPuM4xlGlAVW5IeS94Zq9b9vf7ioM9rYQEL4xngcJX8YbXTFmoSa9fZ1To1IS KvFFl5F8/uqbt22tTpJHdFo243IAn/+ppaXH4efpNCLINiRmt+Pmn0lQbhRmwNph4onc 8dLLi9xa/3kANVv+KDjdS/stNFIt85e5tUdGSTIgZ1L0iZhBFLVrxyGZ7rbCM4GaxRq3 J0xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770649669; x=1771254469; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XegibK6nZtE74LWspbesvNEx78XvtPq2jMKaE0vnzoI=; b=SSEgtXsmKHTknApjHdkHWdK0LXGsCAmfvTwYv5YphqhnLAll0a0O1DLNEmBcgnxQtD si2fDyepgZqu0KC0WHXpazjJ+i0rCiQ2hPDz94ZsTAtSGZxzcdVO/zRUj01xZ0/vUqhr o07e1qU6ShI/1aQ3xxmDoQpCK2yUCCpoA2B1oOZCs9kerQDgI+RRKF/sCct8mlAmd5A/ UkcR/8mgw4R6o7o7uNChtOMejPMwBjsrPO7/akqEbfviSMfd5/AwDWXpWFoEHKk2u32L xBanD5y9dlmXrczBSVHAfmcpe71IjAus0GHydIZiWVGjngS5kT/y2M5IaCXyGb5q/66J bpJQ== X-Gm-Message-State: AOJu0YwzMwWOq8C3I7CPs++QI41QYiZFsUeFBMZk/+hO5LryhJOxyzsR PfTERro6yPoGR1ncSj55xEPptmevEr88jHITI3uMu3ARtkbD3YCk7hxttdArV+maloo= X-Gm-Gg: AZuq6aKqImXx/zvqgZ0Ip22li7KKjKo7SQxqmXNmI0k7lNgYW2kjWsqMQ0r7wx5lQjF 778C//VrSrSxsXJ/eyzk+TY3jZxiDEqY01ZiKqYxwStTnWKxsvsOon2MVQLy+R9H/f81iH55xZD hQutwNEBcYVhdZPv/0OdMfJm5JE8B2/xtEcTcDP8oR7jtkR133n1DhTH66PuA39yg1wU+kEkPap wl/nNwBmmAUs+vWmQ/bGXniIdJzBrAnxHN2K9RuUXAUm6qX1SRJQ5nVhYwXArNyH3ZrH4/YRuJ2 ED01TZ9s0/7o9J3SryBhK47jJk57Ht3c/sj+WAzY00fLc0EFcWCtzHaeQpRE33Df8PKMEIT4KvY 6RAn9dB7/QIa/zrmi87JBv2N8l4i6YIoXci2FzHkDlgaahq867wgtrVYf0EsptbWmuLknwAPHcG QTIJvLE/L8XFEnSRR6YzmJViuuN3SpFubdw6n9QDKCeb9f6idHwMxRxLrrGN/4c8bfHT2kZnzpY 9jmNQ== X-Received: by 2002:a17:907:72c7:b0:b88:505d:2ac with SMTP id a640c23a62f3a-b8edf14ca75mr556288166b.1.1770649669481; Mon, 09 Feb 2026 07:07:49 -0800 (PST) Received: from puffmais2.c.googlers.com (244.175.141.34.bc.googleusercontent.com. [34.141.175.244]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8edae6fa84sm393516366b.67.2026.02.09.07.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Feb 2026 07:07:49 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 09 Feb 2026 15:07:47 +0000 Subject: [PATCH 1/2] regulator: s2mps11: drop redundant sanity checks in s2mpg10_of_parse_cb() 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260209-s2mpg1x-regulators-fixes-v1-1-ead348e64e14@linaro.org> References: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> In-Reply-To: <20260209-s2mpg1x-regulators-fixes-v1-0-ead348e64e14@linaro.org> To: Krzysztof Kozlowski , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= , Dan Carpenter X-Mailer: b4 0.14.2 The sanity checks being removed in this commit are useless as earlier code checks for out-of-bounds conditions already. They also are incorrect (as they're off-by-one). Simply remove this incorrect code. No functional change. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aYmsu8qREppwBESH@stanley.mountain/ Signed-off-by: Andr=C3=A9 Draszik Reviewed-by: Krzysztof Kozlowski --- drivers/regulator/s2mps11.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 2d5510acd0780ab6f9296c48ddcde5efe15ff488..2d67c5c16f487506a2e9e4b119f= 33faa846269f7 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -478,8 +478,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np, return -EINVAL; } =20 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg10)) - return -EINVAL; ext_control =3D ext_control_s2mpg10[ext_control]; break; =20 @@ -503,8 +501,6 @@ static int s2mpg10_of_parse_cb(struct device_node *np, return -EINVAL; } =20 - if (ext_control > ARRAY_SIZE(ext_control_s2mpg11)) - return -EINVAL; ext_control =3D ext_control_s2mpg11[ext_control]; break; =20 --=20 2.53.0.rc2.204.g2597b5adb4-goog