Patch "regulator: tps65219: use IS_ERR() to detect an error pointer" has been added to the 6.2-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

    regulator: tps65219: use IS_ERR() to detect an error pointer

to the 6.2-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:
     regulator-tps65219-use-is_err-to-detect-an-error-poi.patch
and it can be found in the queue-6.2 subdirectory.

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



commit d42c8cc4df51ed4745d8ba57d9d6dec49e026fb0
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Sat Jan 14 10:57:36 2023 -0800

    regulator: tps65219: use IS_ERR() to detect an error pointer
    
    [ Upstream commit 2bbba115c3c9a647bcb3201b014fcc3728fe75c8 ]
    
    Fix pointer comparison to integer warning from gcc & sparse:
    
    GCC:
    ../drivers/regulator/tps65219-regulator.c:370:26: warning: ordered comparison of pointer with integer zero [-Wextra]
      370 |                 if (rdev < 0) {
          |                          ^
    
    sparse warning:
    drivers/regulator/tps65219-regulator.c:370:26: sparse: error: incompatible types for operation (<):
    drivers/regulator/tps65219-regulator.c:370:26: sparse:    struct regulator_dev *[assigned] rdev
    drivers/regulator/tps65219-regulator.c:370:26: sparse:    int
    
    Fixes: c12ac5fc3e0a ("regulator: drivers: Add TI TPS65219 PMIC regulators support")
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Cc: Jerome Neanne <jneanne@xxxxxxxxxxxx>
    Cc: Tony Lindgren <tony@xxxxxxxxxxx>
    Cc: linux-omap@xxxxxxxxxxxxxxx
    Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>
    Cc: Mark Brown <broonie@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230114185736.2076-1-rdunlap@xxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c
index c484c943e4675..070159cb5f094 100644
--- a/drivers/regulator/tps65219-regulator.c
+++ b/drivers/regulator/tps65219-regulator.c
@@ -367,7 +367,7 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
 		irq_data[i].type = irq_type;
 
 		tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, rdev);
-		if (rdev < 0) {
+		if (IS_ERR(rdev)) {
 			dev_err(tps->dev, "Failed to get rdev for %s\n",
 				irq_type->regulator_name);
 			return -EINVAL;



[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