From nobody Tue Feb 10 15:45:43 2026 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 96DC4330318 for ; Sat, 27 Dec 2025 12:24:36 +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=1766838281; cv=none; b=lYStjkIPz3RglbZo3IijPlNAPOHjocdHmMxCInFqQsboD+5H0FeFuMcIn+gU3RvPzvYtg2WJEQYF2/2tlY/Ar+DtBFWcOOAf/zVA6U+F5/DgaOX+KFIkdXmnd7sNuwRm5GSkArIm2nWZapv9p+nPUbVJizIN+McvEbEBNKGQfmI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766838281; c=relaxed/simple; bh=y3nbh6FW3xPkaxUMs+BETGo9YjxcJnI/N944yZIYtZE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KY42xncIbZowqnUpqziZ0WXySOsIGIr3J9LkOKpQg9DWOR9T0WpS5gKM+rOgM6xfZTM06BOrXK8NkQTAuYeiYjLx3TlQ2NdTKvNFBJAakwtqk5ci2PIOrm/3A23pzT6EklaLXCgvGPd9tA3UU3Mt2RDSNCJN4m/mycMJJVkaN34= 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=C2jzbZK8; arc=none smtp.client-ip=209.85.218.44 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="C2jzbZK8" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b728a43e410so1464629266b.1 for ; Sat, 27 Dec 2025 04:24:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1766838274; x=1767443074; 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=C2jzbZK81UiGsI1lDuNBdt0fgLmHIFIQLKPg8kJo+9ZDUL4D68w4Q1uotX/lVetswv tboRZLnnl/NdMkc/R+SaxdNJ/TLnOO4NVjrQ/PzLz5YuHb/bLNBtrFW17n/+89AQBmfc Fhc7ehamvwf0mSkv/+6A7kC4bf7Je5biKMvqG/ZafmsxDma/SBvMEelrTXd4s3XdPChJ Ap+wI/qhWTgShZtiER/nhoygEtjejgBqQNAOomc/KmjEHwjUx8gw7HFPcok2QuTyHifn KqFsc5X7gl2yWYjL/Lv3J1pNrkBPuqLo3ED+RazwrqY09Ta+SE27+XZIIn/+FwmjSdwL 6Dcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766838274; x=1767443074; 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=TfROsg2ycunElmZyHK5YRg3aeqCfH3Kp4Av24ZSrGMmajIBBeMGLgj9uoQbPHiD86D e6yVcvUkfunN5NiZq3f+2iRi6I1sivQi0Aaw5LzU40niM4rlg8JHFzpXcVmY7HMYwFDx p664GTBg//l8e+e0cA9SYfnxC+yPj2QLwkpkeLUsymzbz6jw0okmzBR4XsBbTGjNRI+6 6lGSZBjAhhn8ssitLBJ+zE9pcuPdPnSJB5vFTjT6nDWt8gyrgU26veV2LZOztqtC1w+c WifVbzKx7k1yP8yn1RLOmIZznTeUdzAAPDXz45b9HDmAdyQ0hTGa/zZzTCEEUm+RXfCK y5JQ== X-Forwarded-Encrypted: i=1; AJvYcCXho++b6f69Ng/qzhTlP7S8QogEUXvfxmIACzbbqL6Q13MpW2OBw4fHNpY8o3oCK9RcByK9brBt6BHmU9A=@vger.kernel.org X-Gm-Message-State: AOJu0YyasrGHCpVgqiEhZnv/m36ZzqJmbXkrfdtmOJWKqeq/XXOTMcsl LkWrT4HAjJj3zqdHTt+nz/MnW2b2VtiTZTOeY60wTuqRixIJLNumnPGI/62XZ8E2oXg= X-Gm-Gg: AY/fxX6FY1z8lBKcNGV3GbzyksoT6mNtQgZzgFXO6bmlK5ViSbNtPBzaNF5KldBu5in MNP7IwpXEo7WzOyADbXku4rKajKVjP6cXdMl37TYq7POMn1XxIdadkcJg11pYy8jSOK8vb3rjdM ufArZGC2LEjpJ5/4ro0h7NSN/gVpoH8M7y/rBrLmcGHyj08mAmfbh9hAhIyLapRLIiwfXmS28zq PTnmb9YdJo4Cg21O0gUgqz+c+fsJfIVUI42tHKEpwizuClBEgK2sStvkjC5tG2J8CNUHvSk3aQP lVn38Ve7I+OD36d+q593TOdfZagTnvi5c/2n7YQbNy9IoRxmIF2iAzeakP8+qEvCQKEwuSPzhP5 p0lLToxTteqzFyEOxMtwGSDpcZUnfjdiWk3N4wBu37OsaVThyWnGz3NP3KRKGILNG9B7B3wAJql D4OYoUe0XT52x0vzKHuiOj2fruDmX6XUIif5Rpxna7suCK6uN6sQNVot/GTX3AqOMeZptvdrWsH Ibujg== X-Google-Smtp-Source: AGHT+IHtdsEKevcGZACNYlScwlHYSPODCqmM2Kf20iK43UH8EKdkTB+qjN++AicNMGPFsLLBY/Fh2g== X-Received: by 2002:a17:907:97cf:b0:b79:e99d:913d with SMTP id a640c23a62f3a-b8037058bb0mr2497508866b.42.1766838274376; Sat, 27 Dec 2025 04:24:34 -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 4fb4d7f45d1cf-64b916adc61sm25932659a12.31.2025.12.27.04.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Dec 2025 04:24:34 -0800 (PST) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Sat, 27 Dec 2025 12:24:34 +0000 Subject: [PATCH v5 12/21] 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: <20251227-s2mpg1x-regulators-v5-12-0c04b360b4c9@linaro.org> References: <20251227-s2mpg1x-regulators-v5-0-0c04b360b4c9@linaro.org> In-Reply-To: <20251227-s2mpg1x-regulators-v5-0-0c04b360b4c9@linaro.org> To: Tudor Ambarus , Rob Herring , Conor Dooley , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Lee Jones , Linus Walleij , Bartosz Golaszewski , Krzysztof Kozlowski , Linus Walleij , Bartosz Golaszewski 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