hwmon: (asus-ec-sensors) add missed handle for ENOMEM
Subsystems (2)
Eugene Shalygin
maintainerv3 cover hwmon: (asus-ec-sensors) add missed handle for ENOMEM
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(-)
Signature · 1 line
2.55.0
Eugene Shalygin
maintainerPATCH v3 1/1 hwmon: (asus-ec-sensors) add missed handle for ENOMEM
Add missing return value check in the setup function.
Signed-off-by Eugene Shalygin <[email protected]>
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(-)
drivers/hwmon/asus-ec-sensors.c +5 -3
@@ -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++; }
Signature · 1 line
2.55.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 3 lines
Add missing return value check in the setup function.
Signed-off-by Eugene Shalygin <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 5 lines · Eugene Shalygin
Add missing return value check in the setup function.
Signed-off-by Eugene Shalygin <[email protected]>Fixes d0ddfd241e57 ("hwmon: (asus-ec-sensors) add driver for ASUS EC")
For the future: No empty line between tags, please, and Fixes: comes first.
Applied.
Thanks,
Guenter