Ian Abbott f4dd2367f3 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: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 11:46:34 -07:00
..
2012-10-07 20:55:16 +09:00
2012-10-12 10:21:02 +09:00
2012-10-11 00:45:21 -07:00
2012-10-08 06:33:44 +09:00
2012-10-13 13:22:01 -07:00
2012-10-07 17:29:24 +09:00
2012-10-10 20:15:24 +09:00
2012-10-12 13:56:52 -04:00
2012-10-03 09:44:08 -07:00
2012-10-09 16:11:46 +09:00
2012-10-10 20:15:24 +09:00
2012-10-13 10:57:01 +09:00
2012-10-13 11:16:58 +09:00
2012-10-12 10:21:02 +09:00
2012-10-12 22:20:28 +09:00