Commit 20652ab8 authored by Sachin Kamat's avatar Sachin Kamat Committed by Guenter Roeck

hwmon: (adcxx) Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: Marc Pignat <marc.pignat@hevs.ch>
Acked-by: default avatarMarc Pignat <marc.pignat@hevs.ch>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 650a2c02
......@@ -203,7 +203,6 @@ static int adcxx_probe(struct spi_device *spi)
for (i--; i >= 0; i--)
device_remove_file(&spi->dev, &ad_input[i].dev_attr);
spi_set_drvdata(spi, NULL);
mutex_unlock(&adc->lock);
return status;
}
......@@ -218,7 +217,6 @@ static int adcxx_remove(struct spi_device *spi)
for (i = 0; i < 3 + adc->channels; i++)
device_remove_file(&spi->dev, &ad_input[i].dev_attr);
spi_set_drvdata(spi, NULL);
mutex_unlock(&adc->lock);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment