Re: [PATCH RESEND] spi: erase pointer to drvdata on removal

2012-12-04 Thread Vivien Didelot
Hi Grant, On Tue, 2012-12-04 at 14:56 +, Grant Likely wrote: > Instead of clearing the pointer only in the spi code, perhaps the > checks should be in really_probe() and __device_release_driver() so it > covers all bus types. Also, don't clear the pointer. Just use > dev_err() to report on the

Re: [PATCH RESEND] spi: erase pointer to drvdata on removal

2012-12-04 Thread Grant Likely
On Mon, Dec 3, 2012 at 8:28 PM, Vivien Didelot wrote: > Without this patch, a SPI device may keep its drvdata whereas it was unbound > from its driver. This may result in accessing an invalid pointer. > > As for i2c-core, let the SPI core handle the removal of the device's drvdata, > after a remov

[PATCH RESEND] spi: erase pointer to drvdata on removal

2012-12-03 Thread Vivien Didelot
Without this patch, a SPI device may keep its drvdata whereas it was unbound from its driver. This may result in accessing an invalid pointer. As for i2c-core, let the SPI core handle the removal of the device's drvdata, after a remove(), or a probe() failure. This is a resent of the previous pat