From: H Hartley Sweeten Date: Tue, 22 Mar 2016 18:10:42 +0000 (-0700) Subject: staging: comedi: ni_mio_common: ni_gpct_device_destroy() can handle a NULL pointer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99307a69bf7166325bb8f0b1f1afcb0a0a1aca9a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: ni_mio_common: 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_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index dcaf7e89f299..71c8fd2cfff6 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -5675,8 +5675,6 @@ static void mio_common_detach(struct comedi_device *dev) { struct ni_private *devpriv = dev->private; - if (devpriv) { - if (devpriv->counter_dev) - ni_gpct_device_destroy(devpriv->counter_dev); - } + if (devpriv) + ni_gpct_device_destroy(devpriv->counter_dev); }