]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_pcimio: (!foo) preferred over (foo == NULL)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 4 Mar 2015 19:15:38 +0000 (12:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 00:01:29 +0000 (16:01 -0800)
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_pcimio.c

index 3b2bdebbca5983ae2cc87f552301101ae930f32a..e78739cce1754dd459b22a38d2e93989b182a4bb 100644 (file)
@@ -1183,19 +1183,19 @@ static int pcimio_auto_attach(struct comedi_device *dev,
                return ret;
 
        devpriv->ai_mite_ring = mite_alloc_ring(devpriv->mite);
-       if (devpriv->ai_mite_ring == NULL)
+       if (!devpriv->ai_mite_ring)
                return -ENOMEM;
        devpriv->ao_mite_ring = mite_alloc_ring(devpriv->mite);
-       if (devpriv->ao_mite_ring == NULL)
+       if (!devpriv->ao_mite_ring)
                return -ENOMEM;
        devpriv->cdo_mite_ring = mite_alloc_ring(devpriv->mite);
-       if (devpriv->cdo_mite_ring == NULL)
+       if (!devpriv->cdo_mite_ring)
                return -ENOMEM;
        devpriv->gpct_mite_ring[0] = mite_alloc_ring(devpriv->mite);
-       if (devpriv->gpct_mite_ring[0] == NULL)
+       if (!devpriv->gpct_mite_ring[0])
                return -ENOMEM;
        devpriv->gpct_mite_ring[1] = mite_alloc_ring(devpriv->mite);
-       if (devpriv->gpct_mite_ring[1] == NULL)
+       if (!devpriv->gpct_mite_ring[1])
                return -ENOMEM;
 
        if (devpriv->is_m_series)