mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 20:33:49 -04:00
staging: comedi: amplc_dio200_common: prevent extra free_irq()
`dio200_detach()` in "amplc_dio200.c" calls `amplc_dio200_common_detach()` in "amplc_dio200_common.c", followed by `comedi_legacy_detach()` in "../drivers.c". Both of those functions call `free_irq()` if `dev->irq` is non-zero. The second call produces a warning message because the handler has already been freed. Prevent that by setting `dev->irq = 0` in `amplc_dio200_common_detach()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a948318f70
commit
a386149fb2
@@ -1202,8 +1202,10 @@ void amplc_dio200_common_detach(struct comedi_device *dev)
|
||||
|
||||
if (!thisboard || !devpriv)
|
||||
return;
|
||||
if (dev->irq)
|
||||
if (dev->irq) {
|
||||
free_irq(dev->irq, dev);
|
||||
dev->irq = 0;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(amplc_dio200_common_detach);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user