|
@@ -669,7 +669,6 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
|
|
|
if (!err)
|
|
|
return 0;
|
|
|
|
|
|
- spi_set_drvdata(spi, NULL);
|
|
|
kfree(priv);
|
|
|
return err;
|
|
|
}
|
|
@@ -899,10 +898,8 @@ static int dataflash_remove(struct spi_device *spi)
|
|
|
pr_debug("%s: remove\n", dev_name(&spi->dev));
|
|
|
|
|
|
status = mtd_device_unregister(&flash->mtd);
|
|
|
- if (status == 0) {
|
|
|
- spi_set_drvdata(spi, NULL);
|
|
|
+ if (status == 0)
|
|
|
kfree(flash);
|
|
|
- }
|
|
|
return status;
|
|
|
}
|
|
|
|