hwmon: (adcxx) Remove redundant spi_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 04:06:41 +0000 (09:36 +0530)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 18 Oct 2013 16:12:01 +0000 (09:12 -0700)
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>
drivers/hwmon/adcxx.c

index 751b1f0..04c08c2 100644 (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;