staging: comedi: ni_labpc: remove unnecessary private data validation
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 21 Jan 2015 22:11:46 +0000 (15:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:13 +0000 (19:59 +0800)
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>
drivers/staging/comedi/drivers/ni_labpc.c

index e7b25e8a1467d49fb96a9ec4adf0626187427b6b..a916047791b86bc733d4b1d275476c52220e918a 100644 (file)
@@ -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);
 }