Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f4dd2367 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: 8255_pci: fix possible NULL deref during detach



`pci_8255_detach()` will be called by the comedi core if
`pci_8255_attach_pci()` returns an error.  It currently assumes that
both `board` (assigned from the return value of `comedi_board(dev)`) and
`devpriv` (assigned from `dev->private`) are non-null, but they might
be null, leading to a null pointer dereference.

`pci_8255_detach()` doesn't need to do anything if either `board` or
`devpriv` are null, so just return early in this case.

Cc: <stable@vger.kernel.org> # 3.6.x
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6681e633
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment