forked from Minki/linux
staging: comedi: ni_labpc: remove unnecessary private data validation
The labpc_free_dma_chan() function validates the private data. Remove the unnecessary validation in labpc_datach(). 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>
This commit is contained in:
parent
67a0149ee6
commit
aae59483bc
@ -104,11 +104,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
|
||||
static void labpc_detach(struct comedi_device *dev)
|
||||
{
|
||||
struct labpc_private *devpriv = dev->private;
|
||||
|
||||
if (devpriv)
|
||||
labpc_free_dma_chan(dev);
|
||||
|
||||
labpc_free_dma_chan(dev);
|
||||
comedi_legacy_detach(dev);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user