From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andy@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH v1 1/4] pinctrl: baytrail: Unify messages with help of dev_err_probe()
Date: Mon, 3 Nov 2025 20:58:28 +0100 [thread overview]
Message-ID: <20251103200235.712436-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20251103200235.712436-1-andriy.shevchenko@linux.intel.com>
Unify error messages that might appear during probe phase by
switching to use dev_err_probe().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-baytrail.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 5fd107a00ef8..b3a5222a175f 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1498,9 +1498,9 @@ static int byt_gpio_add_pin_ranges(struct gpio_chip *chip)
ret = gpiochip_add_pin_range(chip, dev_name(dev), 0, 0, vg->soc->npins);
if (ret)
- dev_err(dev, "failed to add GPIO pin range\n");
+ return dev_err_probe(dev, ret, "failed to add GPIO pin range\n");
- return ret;
+ return 0;
}
static int byt_gpio_probe(struct intel_pinctrl *vg)
@@ -1548,9 +1548,9 @@ static int byt_gpio_probe(struct intel_pinctrl *vg)
ret = devm_gpiochip_add_data(vg->dev, gc, vg);
if (ret)
- dev_err(vg->dev, "failed adding byt-gpio chip\n");
+ return dev_err_probe(vg->dev, ret, "failed to register gpiochip\n");
- return ret;
+ return 0;
}
static int byt_set_soc_data(struct intel_pinctrl *vg,
@@ -1601,10 +1601,8 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
vg->dev = dev;
ret = byt_set_soc_data(vg, soc_data);
- if (ret) {
- dev_err(dev, "failed to set soc data\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to set soc data\n");
vg->pctldesc = byt_pinctrl_desc;
vg->pctldesc.name = dev_name(dev);
@@ -1612,10 +1610,8 @@ static int byt_pinctrl_probe(struct platform_device *pdev)
vg->pctldesc.npins = vg->soc->npins;
vg->pctldev = devm_pinctrl_register(dev, &vg->pctldesc, vg);
- if (IS_ERR(vg->pctldev)) {
- dev_err(dev, "failed to register pinctrl driver\n");
- return PTR_ERR(vg->pctldev);
- }
+ if (IS_ERR(vg->pctldev))
+ return dev_err_probe(dev, PTR_ERR(vg->pctldev), "failed to register pinctrl\n");
ret = byt_gpio_probe(vg);
if (ret)
--
2.50.1
next prev parent reply other threads:[~2025-11-03 20:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 19:58 [PATCH v1 0/4] pinctrl: intel: Unify error messages Andy Shevchenko
2025-11-03 19:58 ` Andy Shevchenko [this message]
2025-11-03 19:58 ` [PATCH v1 2/4] pinctrl: cherryview: Unify messages with help of dev_err_probe() Andy Shevchenko
2025-11-03 19:58 ` [PATCH v1 3/4] pinctrl: intel: " Andy Shevchenko
2025-11-03 19:58 ` [PATCH v1 4/4] pinctrl: tangier: " Andy Shevchenko
2025-11-04 5:25 ` [PATCH v1 0/4] pinctrl: intel: Unify error messages Mika Westerberg
2025-11-04 8:31 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251103200235.712436-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).