The labpc_free_dma_chan() function validates the private data. Remove the unnecessary validation in labpc_datach(). Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/ni_labpc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index e7b25e8..a916047 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -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); } -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel