Patch "hwmon: (ina3221) return prober error code" 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

    hwmon: (ina3221) return prober error code

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:
     hwmon-ina3221-return-prober-error-code.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 2acbbea6ec481baefc9c168c2e886c15af4bd8c1
Author: Marcus Folkesson <marcus.folkesson@xxxxxxxxx>
Date:   Fri Mar 10 08:50:35 2023 +0100

    hwmon: (ina3221) return prober error code
    
    [ Upstream commit c93f5e2ab53243b17febabb9422a697017d3d49a ]
    
    ret is set to 0 which do not indicate an error.
    Return -EINVAL instead.
    
    Fixes: a9e9dd9c6de5 ("hwmon: (ina3221) Read channel input source info from DT")
    Signed-off-by: Marcus Folkesson <marcus.folkesson@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20230310075035.246083-1-marcus.folkesson@xxxxxxxxx
    Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index 026f70d7c5a43..1b7f92f23530c 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -672,7 +672,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
 		return ret;
 	} else if (val > INA3221_CHANNEL3) {
 		dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
-		return ret;
+		return -EINVAL;
 	}
 
 	input = &ina->inputs[val];



[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