From: Patrick Rudolph <patrick.rudolph@xxxxxxxxxxxxx> commit 55aab08f1856894d7d47d0ee23abbb4bc4854345 upstream. Refactor pmbus_is_enabled() to return the status without any additional processing as it is already done in _pmbus_is_enabled(). Fixes: df5f6b6af01c ("hwmon: (pmbus/core) Generalise pmbus get status") Cc: stable@xxxxxxxxxxxxxxx # v6.4 Signed-off-by: Patrick Rudolph <patrick.rudolph@xxxxxxxxxxxxx> Signed-off-by: Naresh Solanki <Naresh.Solanki@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230725125428.3966803-1-Naresh.Solanki@xxxxxxxxxxxxx [groeck: Rephrased commit message] Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/hwmon/pmbus/pmbus_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c index fa06325f5a7c..42fb7286805b 100644 --- a/drivers/hwmon/pmbus/pmbus_core.c +++ b/drivers/hwmon/pmbus/pmbus_core.c @@ -2768,7 +2768,7 @@ static int __maybe_unused pmbus_is_enabled(struct device *dev, u8 page) ret = _pmbus_is_enabled(dev, page); mutex_unlock(&data->update_lock); - return !!(ret & PB_OPERATION_CONTROL_ON); + return ret; } #define to_dev_attr(_dev_attr) \ -- 2.41.0