hwmon: (lm70) Remove redundant spi_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 04:06:42 +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: Kaiwan N Billimoria <kaiwan@designergraphix.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/lm70.c

index 016efa26ba7ca48e80733d949745010190416951..505a59e100b0b9a80b099aa8a9abd43fa5ec2220 100644 (file)
@@ -174,7 +174,6 @@ out_dev_reg_failed:
 out_dev_create_file_failed:
        device_remove_file(&spi->dev, &dev_attr_temp1_input);
 out_dev_create_temp_file_failed:
-       spi_set_drvdata(spi, NULL);
        return status;
 }
 
@@ -185,7 +184,6 @@ static int lm70_remove(struct spi_device *spi)
        hwmon_device_unregister(p_lm70->hwmon_dev);
        device_remove_file(&spi->dev, &dev_attr_temp1_input);
        device_remove_file(&spi->dev, &dev_attr_name);
-       spi_set_drvdata(spi, NULL);
 
        return 0;
 }