diff options
author | Ian Abbott <[email protected]> | 2014-07-25 18:07:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2014-07-30 16:47:44 -0700 |
commit | a386149fb2bad23b5c6123894049ce3392bf76b5 (patch) | |
tree | c8de247760af5fb22866b6b11d2e5cc909a2a1e4 | |
parent | a948318f70b4035983db7d178618b407bcd1fecb (diff) |
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 <[email protected]>
Reviewed-by: H Hartley Sweeten <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_dio200_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_dio200_common.c b/drivers/staging/comedi/drivers/amplc_dio200_common.c index 78700e8185ed..3592e58c57d5 100644 --- a/drivers/staging/comedi/drivers/amplc_dio200_common.c +++ b/drivers/staging/comedi/drivers/amplc_dio200_common.c @@ -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); |