hwmon: (adcxx) Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Marc Pignat <[email protected]>
Acked-by: Marc Pignat <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
Sachin Kamat 2013-09-20 09:36:41 +05:30 • committed by Guenter Roeck
commit 20652ab8ca

View file

@ -203,7 +203,6 @@ out_err:
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;