All of lore.kernel.org
 help / color / mirror / Atom feed
* [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; 3+ 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] 3+ 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
  2026-07-12 15:07   ` sashiko-bot
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

* Re: [PATCH v3 1/1] hwmon: (asus-ec-sensors) add missed handle for ENOMEM
  2026-07-12 13:05 ` [PATCH v3 1/1] " Eugene Shalygin
@ 2026-07-12 15:07   ` sashiko-bot
  0 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-12 15:07 UTC (permalink / raw)
  To: Eugene Shalygin; +Cc: linux-hwmon

> Add missing return value check in the setup function.
> 
> Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260712130602.1256700-2-eugene.shalygin@gmail.com?part=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-12 15:07 UTC | newest]

Thread overview: 3+ 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
2026-07-12 15:07   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.