From aae59483bce95c3fffd4fa66d5360712f372ba1a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 21 Jan 2015 15:11:46 -0700 Subject: [PATCH] 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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 e7b25e8a1467..a916047791b8 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.39.5