Patch "leds: lm3697: Don't spam logs when probe is deferred" has been added to the 5.13-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    leds: lm3697: Don't spam logs when probe is deferred

to the 5.13-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     leds-lm3697-don-t-spam-logs-when-probe-is-deferred.patch
and it can be found in the queue-5.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 316f3a97e4b8ee14e31fb66eef42b70877a885b0
Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Date:   Mon May 10 12:50:39 2021 +0300

    leds: lm3697: Don't spam logs when probe is deferred
    
    [ Upstream commit 807553f8bf4afa673750e52905e0f9488179112f ]
    
    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@xxxxxx>
    Signed-off-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
    Signed-off-by: Pavel Machek <pavel@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c
index 7d216cdb91a8..912e8bb22a99 100644
--- a/drivers/leds/leds-lm3697.c
+++ b/drivers/leds/leds-lm3697.c
@@ -203,11 +203,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))



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux