From nobody Mon Feb 9 19:08:22 2026 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 7B71332BF4C for ; Mon, 5 Jan 2026 09:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767603712; cv=none; b=Ged6Fj1mhSROFXczupdycYJQLBFW3c48ys2dWW/Xswjq5RIt4BHIbMXoXUAHm4EUwIHNtH3ELXmht+tOI8RxS6ottiBA7GSYzIGR91qJce1HjahNaUIU/SL+VDUPXNkXSqT7qple6qnqyqJWj7UYybrPOqOOFRDXkoHrJmjNdus= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767603712; c=relaxed/simple; bh=y3nbh6FW3xPkaxUMs+BETGo9YjxcJnI/N944yZIYtZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lM+Lg13inSlfAMX9J+x+ggwGSbJkd1NFHK4JxyzZtPnOxtmrAHgTaqHRu8+BtS5WliQFIvVJo8r94cx7GpXE6l57kBsN7xcxFf23KdpQmKhpBFFyR3EAfrjq3ayVoecdbZDy6uUGo/M5vAQ3AvxayCNaJF+CNnPNWmIC4fRz3lE= 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=ASoMsQJX; arc=none smtp.client-ip=209.85.218.48 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="ASoMsQJX" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-b79e7112398so2442392066b.3 for ; Mon, 05 Jan 2026 01:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767603707; x=1768208507; 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=QpM30Q4ohHxRfzIKhAO8xW+sYH95+aq2w1aPYa726rI=; b=ASoMsQJXiGPxRG0oXZKclWEwCMRVyOcX5KJH4medICejpD83ORI2BPJ0uFxHyiCv88 fQLFo+9+DaDILyZ8wzzaptYLoLyTuFLO1tZeJd345AcJEyj26VSGrTpeJXlRp9WqMP5d QkxvcaVQvRXETrWhzZXM4T1XNpMQCqh8W1aX1igOHO8DTyPFVBe31vb/1KsDkWaSigeB 1MOUF1JWFCzGyop1DQGW1d3KduqS33q/bCR/Z9azNix/ByT6Xy6OsWz64hOTfGtxlr3p As3LASHgqOpdvpEE1PIu7xWl7YABksIiRj+tvLqYQvcEjThwzfdycGfvLH+Cc7VseHxv SR3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767603707; x=1768208507; 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=QpM30Q4ohHxRfzIKhAO8xW+sYH95+aq2w1aPYa726rI=; b=lhlej5ycwms5z8zMOVZ4u0seG/7Oz4xRuNN8zqdpd4mu50dqJYN79Lm5gA7kSmhX0a I90x+h+iT4EBInSsCQiA2pDRg0mT0T5jAURpIcNBwJB185PhawydxkwXWxKEUeUyUzSQ 1pNgyWi9mWZGey4Yi9Qx7c3hiXbuiWbknbd6X0sj0ZqZEdihHW2rbX+TAbu4S8eaWlrQ KNMuuzxqZ/P1of/GjE8qro/KfcbwWbL+/OI2hR75q6yE7/r8Qrp/mH/QB6ALbVE9nUBK TTItsyzMCQzCEHWkXs9w8we89ME58u7rzseq3hyUnwNAO1TRGdQfCUeUU5E9MARw8L6w gkLA== X-Forwarded-Encrypted: i=1; AJvYcCXQ1myo5Z0wxEDOXxRVoolrbeOdIxtIrFOuMphljilYww7XWBU5NxTJFMqi9LhFLjZIGRESNITre9tVVwU=@vger.kernel.org X-Gm-Message-State: AOJu0YyUgZzzoDihe9xBKFZKdf8T8cuOgrVdtLP2AY3qw/CU65KU2PbG 07WBRGRi4u9AMDq7gOr9HL4PQhW3UGFHMWdqlJDXvppGA5atVLpyIY0Qcehnelo/GF4= X-Gm-Gg: AY/fxX7pxnR89hOqRyCwtjOVpfIbOolBD8Zl/5AoYq3/O6FJ6vbr+in09AWZ6/6gaWW xL6atXqNt31mnLdOPjabLOK1qcsHTLb3UqKozD17v4qWXdLZ58zRCm+xHZSxjGna+FkVfT1lHzA 71Xt/cDMiiWSR/7jPE7b6WkYBcAZvuqsdbogtMGbafNx9a8UeVzFtKHLrv4gtFF1uXIAttGFsuM sgFkobStNOzO11wZQ5HVtyrZ6MfOw1ICmZU7SwyLvIs+KDze7CC5RpHgkFxJEyb4GUv0OrcvpbM NG5wrI8vWbRQi45nGQIvvqjJkbbBYszgGBjFG5+vxKW1O6Ufxho8/nA3Mz40ANtA7bAdejX/6lq JIz5w8ymKxGTmDTzwh3ZRbrv86Hh9rTMrCiD/8AE+wGE0OVDR45B1HPeqrPNvpyR7yBFUf3KHC7 T7Z/doSTs1Hd4plhU+4//N6RmWpHIZoMyM/29xmCXi3pECzdB4rEZrv0QhlXv6iAHXq/mvB57gs KlUVg== X-Google-Smtp-Source: AGHT+IH7096ba/fFu26IrqBghvOzgUEHtWzoO37V1e0BEjFy5b8O7gq/dy1I+TNMiOA24hb7GdHXYA== X-Received: by 2002:a17:907:1c27:b0:b7c:eb19:6a3f with SMTP id a640c23a62f3a-b803705e31cmr4969876766b.35.1767603706655; Mon, 05 Jan 2026 01:01:46 -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-b8037f0ecb9sm5384010466b.56.2026.01.05.01.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jan 2026 01:01:46 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 05 Jan 2026 09:01:48 +0000 Subject: [PATCH v6 12/20] regulator: s2mps11: use dev_err_probe() where appropriate 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: <20260105-s2mpg1x-regulators-v6-12-80f4b6d1bf9d@linaro.org> References: <20260105-s2mpg1x-regulators-v6-0-80f4b6d1bf9d@linaro.org> In-Reply-To: <20260105-s2mpg1x-regulators-v6-0-80f4b6d1bf9d@linaro.org> To: Tudor Ambarus , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Lee Jones , Bartosz Golaszewski , Krzysztof Kozlowski , Linus Walleij , Bartosz Golaszewski , Linus Walleij Cc: Peter Griffin , Will McVicker , Juan Yescas , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= , Krzysztof Kozlowski X-Mailer: b4 0.14.2 dev_err_probe() exists to simplify code and harmonise error messages, there's no reason not to use it here. While at it, harmonise some error messages to add regulator name and ID like in other messages in this driver, and update messages to be more similar to other child-drivers of this PMIC (e.g. RTC). Reviewed-by: Krzysztof Kozlowski Signed-off-by: Andr=C3=A9 Draszik --- drivers/regulator/s2mps11.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 1f51fbc6c7b6e158f9707c04d9f030b9eee5e842..30586e9884bfb998ff07e314881= 3344b307506c0 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1249,9 +1249,9 @@ static int s2mps11_pmic_probe(struct platform_device = *pdev) BUILD_BUG_ON(S2MPS_REGULATOR_MAX < ARRAY_SIZE(s2mpu05_regulators)); break; default: - dev_err(&pdev->dev, "Invalid device type: %u\n", - s2mps11->dev_type); - return -EINVAL; + return dev_err_probe(&pdev->dev, -ENODEV, + "Unsupported device type %d\n", + s2mps11->dev_type); } =20 s2mps11->ext_control_gpiod =3D devm_kcalloc(&pdev->dev, rdev_num, @@ -1290,21 +1290,20 @@ static int s2mps11_pmic_probe(struct platform_devic= e *pdev) devm_gpiod_unhinge(&pdev->dev, config.ena_gpiod); regulator =3D devm_regulator_register(&pdev->dev, ®ulators[i], &config); - if (IS_ERR(regulator)) { - dev_err(&pdev->dev, "regulator init failed for %d\n", - i); - return PTR_ERR(regulator); - } + if (IS_ERR(regulator)) + return dev_err_probe(&pdev->dev, PTR_ERR(regulator), + "regulator init failed for %d/%s\n", + regulators[i].id, + regulators[i].name); =20 if (config.ena_gpiod) { ret =3D s2mps14_pmic_enable_ext_control(s2mps11, - regulator); - if (ret < 0) { - dev_err(&pdev->dev, - "failed to enable GPIO control over %s: %d\n", - regulator->desc->name, ret); - return ret; - } + regulator); + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, + "failed to enable GPIO control over %d/%s\n", + regulator->desc->id, + regulator->desc->name); } } =20 --=20 2.52.0.351.gbe84eed79e-goog