From: Greg Kroah-Hartman Date: Sun, 22 Mar 2026 07:23:59 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.1.167~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70c00678ea62c09f88864bcf0b42ad2167be3f38;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch --- diff --git a/queue-5.10/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch b/queue-5.10/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch new file mode 100644 index 0000000000..3029eca31b --- /dev/null +++ b/queue-5.10/hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch @@ -0,0 +1,44 @@ +From 86259558e422b250aa6aa57163a6d759074573f5 Mon Sep 17 00:00:00 2001 +From: Sanman Pradhan +Date: Wed, 18 Mar 2026 19:40:19 +0000 +Subject: hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit() + +From: Sanman Pradhan + +commit 86259558e422b250aa6aa57163a6d759074573f5 upstream. + +isl68137_avs_enable_show_page() uses the return value of +pmbus_read_byte_data() without checking for errors. If the I2C transaction +fails, a negative error code is passed through bitwise operations, +producing incorrect output. + +Add an error check to propagate the return value if it is negative. +Additionally, modernize the callback by replacing sprintf() +with sysfs_emit(). + +Fixes: 038a9c3d1e424 ("hwmon: (pmbus/isl68137) Add driver for Intersil ISL68137 PWM Controller") +Cc: stable@vger.kernel.org +Signed-off-by: Sanman Pradhan +Link: https://lore.kernel.org/r/20260318193952.47908-2-sanman.pradhan@hpe.com +Signed-off-by: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hwmon/pmbus/isl68137.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/hwmon/pmbus/isl68137.c ++++ b/drivers/hwmon/pmbus/isl68137.c +@@ -80,8 +80,11 @@ static ssize_t isl68137_avs_enable_show_ + { + int val = pmbus_read_byte_data(client, page, PMBUS_OPERATION); + +- return sprintf(buf, "%d\n", +- (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS ? 1 : 0); ++ if (val < 0) ++ return val; ++ ++ return sysfs_emit(buf, "%d\n", ++ (val & ISL68137_VOUT_AVS) == ISL68137_VOUT_AVS); + } + + static ssize_t isl68137_avs_enable_store_page(struct i2c_client *client, diff --git a/queue-5.10/series b/queue-5.10/series index d6dad3d184..a1e90267b4 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -227,3 +227,4 @@ net-bonding-fix-null-deref-in-bond_debug_rlb_hash_sh.patch nfnetlink_osf-validate-individual-option-lengths-in-.patch net-dsa-bcm_sf2-fix-missing-clk_disable_unprepare-in.patch icmp-fix-null-pointer-dereference-in-icmp_tag_valida.patch +hwmon-pmbus-isl68137-fix-unchecked-return-value-and-use-sysfs_emit.patch