提交 612340b1 编写于 作者: J Jingoo Han 提交者: Greg Kroah-Hartman

misc: eeprom_93xx46: remove unnecessary spi_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 94459a97
...@@ -378,7 +378,6 @@ static int eeprom_93xx46_remove(struct spi_device *spi) ...@@ -378,7 +378,6 @@ static int eeprom_93xx46_remove(struct spi_device *spi)
device_remove_file(&spi->dev, &dev_attr_erase); device_remove_file(&spi->dev, &dev_attr_erase);
sysfs_remove_bin_file(&spi->dev.kobj, &edev->bin); sysfs_remove_bin_file(&spi->dev.kobj, &edev->bin);
spi_set_drvdata(spi, NULL);
kfree(edev); kfree(edev);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册