From: H Hartley Sweeten Date: Tue, 22 Mar 2016 18:10:41 +0000 (-0700) Subject: staging: comedi: ni_660x: ni_gpct_device_destroy() can handle a NULL pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=26a0fe3ffa24c63a99b1fb314e03723c1e470ba0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: ni_660x: ni_gpct_device_destroy() can handle a NULL pointer Remove the unnecessary NULL pointer check. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index 35602cc7af61..2440cb6a72c7 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -1067,8 +1067,7 @@ static void ni_660x_detach(struct comedi_device *dev) if (dev->irq) free_irq(dev->irq, dev); if (devpriv) { - if (devpriv->counter_dev) - ni_gpct_device_destroy(devpriv->counter_dev); + ni_gpct_device_destroy(devpriv->counter_dev); ni_660x_free_mite_rings(dev); mite_detach(devpriv->mite); }