diff options
Diffstat (limited to 'drivers/hwmon/sht15.c')
-rw-r--r-- | drivers/hwmon/sht15.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 6290a259456e..303c02694c3c 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c | |||
@@ -562,7 +562,7 @@ static int __devinit sht15_probe(struct platform_device *pdev) | |||
562 | ret = sysfs_create_group(&pdev->dev.kobj, &sht15_attr_group); | 562 | ret = sysfs_create_group(&pdev->dev.kobj, &sht15_attr_group); |
563 | if (ret) { | 563 | if (ret) { |
564 | dev_err(&pdev->dev, "sysfs create failed"); | 564 | dev_err(&pdev->dev, "sysfs create failed"); |
565 | goto err_free_data; | 565 | goto err_release_gpio_data; |
566 | } | 566 | } |
567 | 567 | ||
568 | ret = request_irq(gpio_to_irq(data->pdata->gpio_data), | 568 | ret = request_irq(gpio_to_irq(data->pdata->gpio_data), |
@@ -581,10 +581,12 @@ static int __devinit sht15_probe(struct platform_device *pdev) | |||
581 | data->hwmon_dev = hwmon_device_register(data->dev); | 581 | data->hwmon_dev = hwmon_device_register(data->dev); |
582 | if (IS_ERR(data->hwmon_dev)) { | 582 | if (IS_ERR(data->hwmon_dev)) { |
583 | ret = PTR_ERR(data->hwmon_dev); | 583 | ret = PTR_ERR(data->hwmon_dev); |
584 | goto err_release_gpio_data; | 584 | goto err_release_irq; |
585 | } | 585 | } |
586 | return 0; | 586 | return 0; |
587 | 587 | ||
588 | err_release_irq: | ||
589 | free_irq(gpio_to_irq(data->pdata->gpio_data), data); | ||
588 | err_release_gpio_data: | 590 | err_release_gpio_data: |
589 | gpio_free(data->pdata->gpio_data); | 591 | gpio_free(data->pdata->gpio_data); |
590 | err_release_gpio_sck: | 592 | err_release_gpio_sck: |