提交 2825f033 编写于 作者: S Sachin Kamat 提交者: Guenter Roeck

hwmon: (lm70) Remove redundant spi_set_drvdata

Driver core sets driver data to NULL upon failure or remove.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Cc: Kaiwan N Billimoria <kaiwan@designergraphix.com>
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
上级 20652ab8
......@@ -174,7 +174,6 @@ static int lm70_probe(struct spi_device *spi)
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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册