diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2013-08-23 15:37:17 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 21:31:47 +0400 |
commit | 3955dfa8216f712bc204a5ad2f4e51efff252fde (patch) | |
tree | fd4e91763cbf0063028bcc1ec2d2ea5f94437419 /fs/gfs2/glops.h | |
parent | 06cdff8a593bc52d53ce5c4c5cfc961a7fc32ad3 (diff) | |
download | linux-3955dfa8216f712bc204a5ad2f4e51efff252fde.tar.xz |
staging: comedi: bug-fix NULL pointer dereference on failed attach
Commit dcd7b8bd63cb81c5b973bf86510ca3c80bbbd162 ("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 <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/gfs2/glops.h')
0 files changed, 0 insertions, 0 deletions