lkml.org 
[lkml]   [2020]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2020-11-24 14:34    [W:0.039 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site