summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/hwmon/scmi-hwmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/scmi-hwmon.c b/drivers/hwmon/scmi-hwmon.c
index 32e750373ced..363bf56eb0f2 100644
--- a/drivers/hwmon/scmi-hwmon.c
+++ b/drivers/hwmon/scmi-hwmon.c
@@ -138,7 +138,7 @@ static int scmi_hwmon_probe(struct scmi_device *sdev)
for (i = 0; i < nr_sensors; i++) {
sensor = handle->sensor_ops->info_get(handle, i);
if (!sensor)
- return PTR_ERR(sensor);
+ return -EINVAL;
switch (sensor->type) {
case TEMPERATURE_C: