staging: comedi: ni_pcidio: (!foo) preferred over (foo == NULL)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 4 Mar 2015 19:15:37 +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_pcidio.c

index db399fe8c301049143009a602401e9a9f01916a7..8d91029c7d3088efab4e3e2f99cdd67146742fce 100644 (file)
@@ -304,7 +304,7 @@ static int ni_pcidio_request_di_mite_channel(struct comedi_device *dev)
        devpriv->di_mite_chan =
            mite_request_channel_in_range(devpriv->mite,
                                          devpriv->di_mite_ring, 1, 2);
-       if (devpriv->di_mite_chan == NULL) {
+       if (!devpriv->di_mite_chan) {
                spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
                dev_err(dev->class_dev, "failed to reserve mite dma channel\n");
                return -EBUSY;
@@ -924,7 +924,7 @@ static int nidio_auto_attach(struct comedi_device *dev,
                return ret;
 
        devpriv->di_mite_ring = mite_alloc_ring(devpriv->mite);
-       if (devpriv->di_mite_ring == NULL)
+       if (!devpriv->di_mite_ring)
                return -ENOMEM;
 
        if (board->uses_firmware) {