Commit 307da4b2 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_660x: (!foo) preferred over (foo == NULL)

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5effdf70
......@@ -702,7 +702,7 @@ static int ni_660x_request_mite_channel(struct comedi_device *dev,
BUG_ON(counter->mite_chan);
mite_chan = mite_request_channel(devpriv->mite,
mite_ring(devpriv, counter));
if (mite_chan == NULL) {
if (!mite_chan) {
spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
dev_err(dev->class_dev,
"failed to reserve mite dma channel for counter\n");
......@@ -861,7 +861,7 @@ static int ni_660x_alloc_mite_rings(struct comedi_device *dev)
for (j = 0; j < counters_per_chip; ++j) {
devpriv->mite_rings[i][j] =
mite_alloc_ring(devpriv->mite);
if (devpriv->mite_rings[i][j] == NULL)
if (!devpriv->mite_rings[i][j])
return -ENOMEM;
}
}
......@@ -1107,7 +1107,7 @@ static int ni_660x_auto_attach(struct comedi_device *dev,
ni_gpct_variant_660x,
ni_660x_num_counters
(dev));
if (devpriv->counter_dev == NULL)
if (!devpriv->counter_dev)
return -ENOMEM;
for (i = 0; i < NI_660X_MAX_NUM_COUNTERS; ++i) {
s = &dev->subdevices[NI_660X_GPCT_SUBDEV(i)];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment