diff options
Diffstat (limited to 'drivers/thermal/rcar_thermal.c')
-rw-r--r-- | drivers/thermal/rcar_thermal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index ab518140207d..2cc5b6115e3e 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c | |||
@@ -364,6 +364,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
364 | struct resource *res, *irq; | 364 | struct resource *res, *irq; |
365 | int mres = 0; | 365 | int mres = 0; |
366 | int i; | 366 | int i; |
367 | int ret = -ENODEV; | ||
367 | int idle = IDLE_INTERVAL; | 368 | int idle = IDLE_INTERVAL; |
368 | 369 | ||
369 | common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); | 370 | common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); |
@@ -438,6 +439,7 @@ static int rcar_thermal_probe(struct platform_device *pdev) | |||
438 | idle); | 439 | idle); |
439 | if (IS_ERR(priv->zone)) { | 440 | if (IS_ERR(priv->zone)) { |
440 | dev_err(dev, "can't register thermal zone\n"); | 441 | dev_err(dev, "can't register thermal zone\n"); |
442 | ret = PTR_ERR(priv->zone); | ||
441 | goto error_unregister; | 443 | goto error_unregister; |
442 | } | 444 | } |
443 | 445 | ||
@@ -457,7 +459,7 @@ error_unregister: | |||
457 | rcar_thermal_for_each_priv(priv, common) | 459 | rcar_thermal_for_each_priv(priv, common) |
458 | thermal_zone_device_unregister(priv->zone); | 460 | thermal_zone_device_unregister(priv->zone); |
459 | 461 | ||
460 | return -ENODEV; | 462 | return ret; |
461 | } | 463 | } |
462 | 464 | ||
463 | static int rcar_thermal_remove(struct platform_device *pdev) | 465 | static int rcar_thermal_remove(struct platform_device *pdev) |