Patch "ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()" has been added to the 5.4-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

    ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()

to the 5.4-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:
     acpi-pmic-remove-unneeded-check-in-tps68470_pmic_opr.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 159b4fb42b66ba9684f61a076c68a9e210b2b4fc
Author: Aleksandr Mishin <amishin@xxxxxxxxxx>
Date:   Wed Jul 31 01:53:39 2024 +0300

    ACPI: PMIC: Remove unneeded check in tps68470_pmic_opregion_probe()
    
    [ Upstream commit 07442c46abad1d50ac82af5e0f9c5de2732c4592 ]
    
    In tps68470_pmic_opregion_probe() pointer 'dev' is compared to NULL which
    is useless.
    
    Fix this issue by removing unneeded check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: e13452ac3790 ("ACPI / PMIC: Add TI PMIC TPS68470 operation region driver")
    Suggested-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
    Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>
    Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
    Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
    Link: https://patch.msgid.link/20240730225339.13165-1-amishin@xxxxxxxxxx
    [ rjw: Subject edit ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/pmic/tps68470_pmic.c b/drivers/acpi/pmic/tps68470_pmic.c
index ebd03e4729555..0d1a82eeb4b0b 100644
--- a/drivers/acpi/pmic/tps68470_pmic.c
+++ b/drivers/acpi/pmic/tps68470_pmic.c
@@ -376,10 +376,8 @@ static int tps68470_pmic_opregion_probe(struct platform_device *pdev)
 	struct tps68470_pmic_opregion *opregion;
 	acpi_status status;
 
-	if (!dev || !tps68470_regmap) {
-		dev_warn(dev, "dev or regmap is NULL\n");
-		return -EINVAL;
-	}
+	if (!tps68470_regmap)
+		return dev_err_probe(dev, -EINVAL, "regmap is missing\n");
 
 	if (!handle) {
 		dev_warn(dev, "acpi handle is NULL\n");




[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