[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230310075035.246083-1-marcus.folkesson@gmail.com>
Date: Fri, 10 Mar 2023 08:50:35 +0100
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
Marcus Folkesson <marcus.folkesson@...il.com>
Subject: [PATCH] hwmon: (ina3221) return prober error code
ret is set to 0 which do not indicate an error.
Return -EINVAL instead.
Signed-off-by: Marcus Folkesson <marcus.folkesson@...il.com>
---
drivers/hwmon/ina3221.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
index e06186986444..f3a4c5633b1e 100644
--- a/drivers/hwmon/ina3221.c
+++ b/drivers/hwmon/ina3221.c
@@ -772,7 +772,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];
--
2.39.2
Powered by blists - more mailing lists