summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/max1363.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-07 15:17:52 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-07 15:17:52 -0800
commit17cb3be61b45d716f6b21a9380925493413ce0ed (patch)
treed29ca8bc010a22f358032346d7e7b6887c455e08 /drivers/iio/adc/max1363.c
parentd7f9729f6e06c9613a88a18c4e1fbbdf2f6146fd (diff)
parente16a922a27ec352537a8027cadc32dc156534ca5 (diff)
Merge branch 'staging-linus' into staging-next
This is to get the comedi fixes, and resolve the issue in comdi_test.c and comedi_fops.c that were caused by changes in both branches. It also allows the fwserial driver changes to be applied, as they required the fixes that are in staging-linus. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/max1363.c')
-rw-r--r--drivers/iio/adc/max1363.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 0ba4fea960ac..aac572290cbf 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -1558,17 +1558,18 @@ static int __devinit max1363_probe(struct i2c_client *client,
return 0;
error_free_irq:
- free_irq(st->client->irq, indio_dev);
+ if (client->irq)
+ free_irq(st->client->irq, indio_dev);
error_uninit_buffer:
iio_triggered_buffer_cleanup(indio_dev);
error_free_available_scan_masks:
kfree(indio_dev->available_scan_masks);
-error_unregister_map:
- iio_map_array_unregister(indio_dev, client->dev.platform_data);
error_disable_reg:
regulator_disable(st->reg);
error_put_reg:
regulator_put(st->reg);
+error_unregister_map:
+ iio_map_array_unregister(indio_dev, client->dev.platform_data);
error_free_device:
iio_device_free(indio_dev);
error_out:
@@ -1585,10 +1586,8 @@ static int __devexit max1363_remove(struct i2c_client *client)
free_irq(st->client->irq, indio_dev);
iio_triggered_buffer_cleanup(indio_dev);
kfree(indio_dev->available_scan_masks);
- if (!IS_ERR(st->reg)) {
- regulator_disable(st->reg);
- regulator_put(st->reg);
- }
+ regulator_disable(st->reg);
+ regulator_put(st->reg);
iio_map_array_unregister(indio_dev, client->dev.platform_data);
iio_device_free(indio_dev);