lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 10 May 2021 12:50:39 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Pavel Machek <pavel@....cz>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Amireddy Mallikarjuna reddy 
        <mallikarjunax.reddy@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Marek BehĂșn <marek.behun@....cz>,
        Abanoub Sameh <abanoubsameh8@...il.com>,
        Dan Murphy <dmurphy@...com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v1 22/28] leds: lm3697: Don't spam logs when probe is deferred

From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

When requesting GPIO line the probe can be deferred.
In such case don't spam logs with an error message.
This can be achieved by switching to dev_err_probe().

Fixes: 5c1d824cda9f ("leds: lm3697: Introduce the lm3697 driver")
Cc: Dan Murphy <dmurphy@...com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
---
 drivers/leds/leds-lm3697.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c
index 6262ae69591e..7e52f9bd9469 100644
--- a/drivers/leds/leds-lm3697.c
+++ b/drivers/leds/leds-lm3697.c
@@ -208,11 +208,9 @@ static int lm3697_probe_dt(struct lm3697 *priv)
 
 	priv->enable_gpio = devm_gpiod_get_optional(dev, "enable",
 						    GPIOD_OUT_LOW);
-	if (IS_ERR(priv->enable_gpio)) {
-		ret = PTR_ERR(priv->enable_gpio);
-		dev_err(dev, "Failed to get enable gpio: %d\n", ret);
-		return ret;
-	}
+	if (IS_ERR(priv->enable_gpio))
+		return dev_err_probe(dev, PTR_ERR(priv->enable_gpio),
+					  "Failed to get enable GPIO\n");
 
 	priv->regulator = devm_regulator_get(dev, "vled");
 	if (IS_ERR(priv->regulator))
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ