lkml.org 
[lkml]   [2023]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] pinctrl: qcom-pmic-gpio: silence -EPROBE_DEFER message on probe
Date
The following message shows up one or more times when booting a Qualcomm
SA8775 Development board:

qcom-spmi-gpio c440000.spmi:pmic@2:gpio@8800: can't add gpio chip

Convert this over to use dev_err_probe() to silence this message.

Signed-off-by: Brian Masney <bmasney@redhat.com>
---
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index deded9c6fd7d..d7576fa14935 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -1154,10 +1154,8 @@ static int pmic_gpio_probe(struct platform_device *pdev)
girq->child_irq_domain_ops.translate = pmic_gpio_domain_translate;

ret = gpiochip_add_data(&state->chip, state);
- if (ret) {
- dev_err(state->dev, "can't add gpio chip\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(state->dev, ret, "can't add gpio chip\n");

/*
* For DeviceTree-supported systems, the gpio core checks the
--
2.41.0
\
 
 \ /
  Last update: 2023-08-17 17:02    [W:0.056 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site