* [PATCH v3 0/1] hwmon: (asus-ec-sensors) add missed handle for ENOMEM
@ 2026-07-12 13:05 Eugene Shalygin
2026-07-12 13:05 ` [PATCH v3 1/1] " Eugene Shalygin
0 siblings, 1 reply; 2+ messages in thread
From: Eugene Shalygin @ 2026-07-12 13:05 UTC (permalink / raw)
To: eugene.shalygin
Cc: Guenter Roeck, open list:ASUS EC HARDWARE MONITOR DRIVER,
open list
v3: fix formatting
v2: fix silly mistake when 0 would be returned from the setup function
in case of error in asus_ec_hwmon_add_chan_info(), making the module
load in partially initialized state.
Eugene Shalygin (1):
hwmon: (asus-ec-sensors) add missed handle for ENOMEM
drivers/hwmon/asus-ec-sensors.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v3 1/1] hwmon: (asus-ec-sensors) add missed handle for ENOMEM
2026-07-12 13:05 [PATCH v3 0/1] hwmon: (asus-ec-sensors) add missed handle for ENOMEM Eugene Shalygin
@ 2026-07-12 13:05 ` Eugene Shalygin
0 siblings, 0 replies; 2+ messages in thread
From: Eugene Shalygin @ 2026-07-12 13:05 UTC (permalink / raw)
To: eugene.shalygin
Cc: Guenter Roeck, open list:ASUS EC HARDWARE MONITOR DRIVER,
open list
Add missing return value check in the setup function.
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Fixes: d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC")
---
drivers/hwmon/asus-ec-sensors.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index eb71e41fd4f4..65d2bb1aa8ff 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -1495,9 +1495,11 @@ static int asus_ec_probe(struct platform_device *pdev)
if (!nr_count[type])
continue;
- asus_ec_hwmon_add_chan_info(asus_ec_hwmon_chan, dev,
- nr_count[type], type,
- hwmon_attributes[type]);
+ status = asus_ec_hwmon_add_chan_info(asus_ec_hwmon_chan, dev,
+ nr_count[type], type,
+ hwmon_attributes[type]);
+ if (status)
+ return status;
*ptr_asus_ec_ci++ = asus_ec_hwmon_chan++;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-12 15:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-12 13:05 [PATCH v3 0/1] hwmon: (asus-ec-sensors) add missed handle for ENOMEM Eugene Shalygin
2026-07-12 13:05 ` [PATCH v3 1/1] " Eugene Shalygin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox