mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
Commit dcd7b8bd63 ("staging: comedi: put
module _after_ detach" by myself) reversed a couple of calls in
`comedi_device_attach()` when recovering from an error returned by the
low-level driver's 'attach' handler. Unfortunately, that introduced a
NULL pointer dereference bug as `dev->driver` is NULL after the call to
`comedi_device_detach()`. We still have a pointer to the low-level
comedi driver structure in the `driv` variable, so use that instead.
Signed-off-by: Ian Abbott <[email protected]>
Cc: <[email protected]> # 3.10+
Signed-off-by: Greg Kroah-Hartman <[email protected]>