Skip to content

Commit 55aab08

Browse files
PatrickRudolphgroeck
authored andcommitted
hwmon: (pmbus_core) Fix pmbus_is_enabled()
Refactor pmbus_is_enabled() to return the status without any additional processing as it is already done in _pmbus_is_enabled(). Fixes: df5f6b6 ("hwmon: (pmbus/core) Generalise pmbus get status") Cc: [email protected] # v6.4 Signed-off-by: Patrick Rudolph <[email protected]> Signed-off-by: Naresh Solanki <[email protected]> Link: https://lore.kernel.org/r/[email protected] [groeck: Rephrased commit message] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 54685ab commit 55aab08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/pmbus/pmbus_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2768,7 +2768,7 @@ static int __maybe_unused pmbus_is_enabled(struct device *dev, u8 page)
27682768
ret = _pmbus_is_enabled(dev, page);
27692769
mutex_unlock(&data->update_lock);
27702770

2771-
return !!(ret & PB_OPERATION_CONTROL_ON);
2771+
return ret;
27722772
}
27732773

27742774
#define to_dev_attr(_dev_attr) \

0 commit comments

Comments
 (0)