diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-20 00:06:41 -0400 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2013-10-18 12:12:01 -0400 |
commit | 20652ab8ca3854a1967baf8452c8bedceff7b92b (patch) | |
tree | 54974c745a2d06bfe5fee44cc07bd6e78aa45706 /drivers/hwmon | |
parent | 650a2c02b5a0eaf46209bf505f95739366119bc8 (diff) |
hwmon: (adcxx) Remove redundant spi_set_drvdata
Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Marc Pignat <marc.pignat@hevs.ch>
Acked-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/adcxx.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c index 751b1f0264a4..04c08c2f79b8 100644 --- a/drivers/hwmon/adcxx.c +++ b/drivers/hwmon/adcxx.c | |||
@@ -203,7 +203,6 @@ out_err: | |||
203 | for (i--; i >= 0; i--) | 203 | for (i--; i >= 0; i--) |
204 | device_remove_file(&spi->dev, &ad_input[i].dev_attr); | 204 | device_remove_file(&spi->dev, &ad_input[i].dev_attr); |
205 | 205 | ||
206 | spi_set_drvdata(spi, NULL); | ||
207 | mutex_unlock(&adc->lock); | 206 | mutex_unlock(&adc->lock); |
208 | return status; | 207 | return status; |
209 | } | 208 | } |
@@ -218,7 +217,6 @@ static int adcxx_remove(struct spi_device *spi) | |||
218 | for (i = 0; i < 3 + adc->channels; i++) | 217 | for (i = 0; i < 3 + adc->channels; i++) |
219 | device_remove_file(&spi->dev, &ad_input[i].dev_attr); | 218 | device_remove_file(&spi->dev, &ad_input[i].dev_attr); |
220 | 219 | ||
221 | spi_set_drvdata(spi, NULL); | ||
222 | mutex_unlock(&adc->lock); | 220 | mutex_unlock(&adc->lock); |
223 | 221 | ||
224 | return 0; | 222 | return 0; |