On Sat, 2012-10-27 at 22:36 +0100, Ian Abbott wrote:
> [ Follow upstream commit aaeb61a97b7159ebe30b18a422d04eeabfa8790b ]
> 
> `pc236_detach()` is called by the comedi core if it attempted to attach
> a device and failed.  `pc236_detach()` calls `pc236_intr_disable()` if
> the comedi device private data pointer (`devpriv`) is non-null.  This
> test is insufficient as `pc236_intr_disable()` accesses hardware
> registers and the attach routine may have failed before it has saved
> their I/O base addresses.
> 
> Fix it by checking `dev->iobase` is non-zero before calling
> `pc236_intr_disable()` as that means the I/O base addresses have been
> saved and the hardware registers can be accessed.  It also implies the
> comedi device private data pointer is valid, so there is no need to
> check it.
> 
> Signed-off-by: Ian Abbott <[email protected]>
> ---
> This patch is for the stable 3.0 kernel.
[...]

Queued up for 3.2, since you said this should be applied to both 3.0 and
3.4...

Ben.

-- 
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to