Skip to content

Commit 7adbbb3

Browse files
bbkzzdlezcano
authored andcommitted
thermal/drivers/qcom: Remove redundant msg at probe time
The upper-layer devm_thermal_add_hwmon_sysfs() function can directly print error information. Signed-off-by: Yangtao Li <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a4ebd42 commit 7adbbb3

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

drivers/thermal/qcom/qcom-spmi-adc-tm5.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,7 @@ static int adc_tm5_register_tzd(struct adc_tm5_chip *adc_tm)
689689
return PTR_ERR(tzd);
690690
}
691691
adc_tm->channels[i].tzd = tzd;
692-
if (devm_thermal_add_hwmon_sysfs(adc_tm->dev, tzd))
693-
dev_warn(adc_tm->dev,
694-
"Failed to add hwmon sysfs attributes\n");
692+
devm_thermal_add_hwmon_sysfs(adc_tm->dev, tzd);
695693
}
696694

697695
return 0;

drivers/thermal/qcom/qcom-spmi-temp-alarm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,7 @@ static int qpnp_tm_probe(struct platform_device *pdev)
459459
return ret;
460460
}
461461

462-
if (devm_thermal_add_hwmon_sysfs(&pdev->dev, chip->tz_dev))
463-
dev_warn(&pdev->dev,
464-
"Failed to add hwmon sysfs attributes\n");
462+
devm_thermal_add_hwmon_sysfs(&pdev->dev, chip->tz_dev);
465463

466464
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, qpnp_tm_isr,
467465
IRQF_ONESHOT, node->name, chip);

drivers/thermal/qcom/tsens.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,9 +1209,7 @@ static int tsens_register(struct tsens_priv *priv)
12091209
if (priv->ops->enable)
12101210
priv->ops->enable(priv, i);
12111211

1212-
if (devm_thermal_add_hwmon_sysfs(priv->dev, tzd))
1213-
dev_warn(priv->dev,
1214-
"Failed to add hwmon sysfs attributes\n");
1212+
devm_thermal_add_hwmon_sysfs(priv->dev, tzd);
12151213
}
12161214

12171215
/* VER_0 require to set MIN and MAX THRESH

0 commit comments

Comments
 (0)