diff mbox series

[-next] thermal: broadcom: simplify the return expression of bcm2711_thermal_probe()

Message ID 20201210135432.1249-1-zhengyongjun3@huawei.com
State Accepted
Commit ea21f589de9a7d787f50da480d01457d8dcdd64a
Headers show
Series [-next] thermal: broadcom: simplify the return expression of bcm2711_thermal_probe() | expand

Commit Message

Zheng Yongjun Dec. 10, 2020, 1:54 p.m. UTC
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/thermal/broadcom/bcm2711_thermal.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Nicolas Saenz Julienne Dec. 10, 2020, 2:34 p.m. UTC | #1
On Thu, 2020-12-10 at 21:54 +0800, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Regards,
Nicolas
Florian Fainelli Dec. 10, 2020, 5:23 p.m. UTC | #2
On 12/10/2020 5:54 AM, Zheng Yongjun wrote:
> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
diff mbox series

Patch

diff --git a/drivers/thermal/broadcom/bcm2711_thermal.c b/drivers/thermal/broadcom/bcm2711_thermal.c
index 67c2a737bc9d..1ec57d9ecf53 100644
--- a/drivers/thermal/broadcom/bcm2711_thermal.c
+++ b/drivers/thermal/broadcom/bcm2711_thermal.c
@@ -102,11 +102,7 @@  static int bcm2711_thermal_probe(struct platform_device *pdev)
 	priv->thermal = thermal;
 
 	thermal->tzp->no_hwmon = false;
-	ret = thermal_add_hwmon_sysfs(thermal);
-	if (ret)
-		return ret;
-
-	return 0;
+	return thermal_add_hwmon_sysfs(thermal);
 }
 
 static struct platform_driver bcm2711_thermal_driver = {