Messages in this thread | | | Date | Tue, 24 Nov 2020 13:31:39 +0000 | From | Mark Brown <> | Subject | Re: [PATCH v2 2/3] spi: Use bus_type functions for probe, remove and shutdown |
| |
On Tue, Nov 24, 2020 at 02:01:07PM +0100, Uwe Kleine-König wrote: > On Tue, Nov 24, 2020 at 01:03:25PM +0100, Marek Szyprowski wrote:
> > > + if (sdrv->shutdown) > > > + sdrv->shutdown(to_spi_device(dev)); > > > }
> > In the above function dev->driver might be NULL, so its use in > > to_spi_driver() and sdrv->shutdown leads to NULL pointer dereference. I > > didn't check the details, but a simple check for NULL dev->driver and > > return is enough to fix this issue. I can send such fix if you want.
> Ah, I see. shutdown is called for unbound devices, too. Assuming that > Mark prefers a fix on top instead of an updated patch: Yes, please send > a fix. Otherwise I can do this, too, as I introduced the problem.
Yes, please send an incremental fix (in general in a situation like this I'd just send a fix as part of the original report, it's quicker if the fix is OK). [unhandled content-type:application/pgp-signature] | |