Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bba07c13 authored by kbuild test robot's avatar kbuild test robot Committed by Eduardo Valentin
Browse files

thermal: fix ptr_ret.cocci warnings



drivers/thermal/tango_thermal.c:86:1-3: WARNING: PTR_ERR_OR_ZERO can be used

 Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent d2901603
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -83,10 +83,7 @@ static int tango_thermal_probe(struct platform_device *pdev)
	writel(CMD_ON, priv->base + TEMPSI_CMD);
	writel(CMD_ON, priv->base + TEMPSI_CMD);


	tzdev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, priv, &ops);
	tzdev = devm_thermal_zone_of_sensor_register(&pdev->dev, 0, priv, &ops);
	if (IS_ERR(tzdev))
	return PTR_ERR_OR_ZERO(tzdev);
		return PTR_ERR(tzdev);

	return 0;
}
}


static const struct of_device_id tango_sensor_ids[] = {
static const struct of_device_id tango_sensor_ids[] = {