staging: comedi: ni_660x: (!foo) preferred over (foo == NULL)
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>
This commit is contained in:
parent
5effdf7081
commit
307da4b2e8
1 changed files with 3 additions and 3 deletions
|
|
@ -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)];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue