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");
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;
}
}
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)];