summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Shalygin <eugene.shalygin@gmail.com>2026-07-12 15:05:05 +0200
committerGuenter Roeck <linux@roeck-us.net>2026-07-19 07:15:04 -0700
commit9813c1f49efeadbcb17e4a41972350ac783f9cac (patch)
treed002db4517cb5fc7669710fe7bf4193053251b58
parent60710b2af13b81da71b429d3f8b19dd70310729d (diff)
downloadlinux-next-9813c1f49efeadbcb17e4a41972350ac783f9cac.tar.gz
linux-next-9813c1f49efeadbcb17e4a41972350ac783f9cac.zip
hwmon: (asus-ec-sensors) add missed handle for ENOMEM
Add missing return value check in the setup function. Fixes: d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC") Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com> Link: https://lore.kernel.org/r/20260712130602.1256700-2-eugene.shalygin@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/asus-ec-sensors.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index f8756c564aa1..01a022b3ee82 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++;
}