]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_660x: remove BUG_ON() in ni_660x_request_mite_channel()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 22 Mar 2016 18:10:25 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
This BUG_ON() happens if a mite DMA channel is already requested when an
ansynchronous command is started for one of the counter subdevices.

The comedi core will only call the (*do_cmd) if the subdevice is not busy.
In this driver, the (*cancel) for the subdevice will always release any
requested mite DMA channel.

Remove the BUG_ON() which can never occur.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_660x.c

index 79678af8e02c8e38166e2eed1c4d32ee6f14644d..232c89767da82fbb8ad92f4d4f83b9b91352db11 100644 (file)
@@ -599,7 +599,6 @@ static int ni_660x_request_mite_channel(struct comedi_device *dev,
        struct mite_channel *mite_chan;
 
        spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
-       BUG_ON(counter->mite_chan);
        mite_chan = mite_request_channel(devpriv->mite,
                                         mite_ring(devpriv, counter));
        if (!mite_chan) {