There are a couple of places in labpc_ai_cmd() that return without
releasing the spin-lock. These places should not be reachable, but
release the spin-lock anyway.
Spotted by H Hartley Sweeten in the "staging" sources.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
break;
default:
comedi_error(dev, "bug with start_src");
break;
default:
comedi_error(dev, "bug with start_src");
+ comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
break;
default:
comedi_error(dev, "bug with stop_src");
break;
default:
comedi_error(dev, "bug with stop_src");
+ comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
return -1;
}
devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG);
return -1;
}
devpriv->write_byte(devpriv->command2_bits, dev->iobase + COMMAND2_REG);