X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fthermal%2Frcar_thermal.c;h=5f817923f374f5f08412bda03876c831da68b697;hb=2ab78a724b1fd885b65199707b8e053677745457;hp=82daba09e1503a53d67e6f26705f80e563208fe7;hpb=6ea24cf79e055f0a62a64baa8587e2254a493c7b;p=karo-tx-linux.git diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 82daba09e150..5f817923f374 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -492,7 +492,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) goto error_unregister; if (of_data == USE_OF_THERMAL) - priv->zone = thermal_zone_of_sensor_register( + priv->zone = devm_thermal_zone_of_sensor_register( dev, i, priv, &rcar_thermal_zone_of_ops); else @@ -504,6 +504,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) if (IS_ERR(priv->zone)) { dev_err(dev, "can't register thermal zone\n"); ret = PTR_ERR(priv->zone); + priv->zone = NULL; goto error_unregister; }