diff options
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 22bf981d393b..82607add69a9 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -554,7 +554,7 @@ thermostat_init(void) | |||
554 | const u32 *prop; | 554 | const u32 *prop; |
555 | int i = 0, offset = 0; | 555 | int i = 0, offset = 0; |
556 | int err; | 556 | int err; |
557 | 557 | ||
558 | np = of_find_node_by_name(NULL, "fan"); | 558 | np = of_find_node_by_name(NULL, "fan"); |
559 | if (!np) | 559 | if (!np) |
560 | return -ENODEV; | 560 | return -ENODEV; |
@@ -613,13 +613,13 @@ thermostat_init(void) | |||
613 | } | 613 | } |
614 | 614 | ||
615 | of_dev = of_platform_device_create(np, "temperatures", NULL); | 615 | of_dev = of_platform_device_create(np, "temperatures", NULL); |
616 | 616 | of_node_put(np); | |
617 | |||
617 | if (of_dev == NULL) { | 618 | if (of_dev == NULL) { |
618 | printk(KERN_ERR "Can't register temperatures device !\n"); | 619 | printk(KERN_ERR "Can't register temperatures device !\n"); |
619 | of_node_put(np); | ||
620 | return -ENODEV; | 620 | return -ENODEV; |
621 | } | 621 | } |
622 | 622 | ||
623 | err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature); | 623 | err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature); |
624 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature); | 624 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature); |
625 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit); | 625 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit); |