From: H Hartley Sweeten Date: Wed, 4 Mar 2015 19:15:37 +0000 (-0700) Subject: staging: comedi: ni_pcidio: (!foo) preferred over (foo == NULL) X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4ce82def8da5787d8661fa5f7d5f7c899b5a20d9;p=linux-beck.git staging: comedi: ni_pcidio: (!foo) preferred over (foo == NULL) Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index db399fe8c301..8d91029c7d30 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -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) {