From: H Hartley Sweeten Date: Wed, 4 Mar 2015 19:15:38 +0000 (-0700) Subject: staging: comedi: ni_pcimio: (!foo) preferred over (foo == NULL) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9bacea57f445a2bc199401d1149d6f323c531028;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: ni_pcimio: (!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_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index 3b2bdebbca59..e78739cce175 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -1183,19 +1183,19 @@ static int pcimio_auto_attach(struct comedi_device *dev, return ret; devpriv->ai_mite_ring = mite_alloc_ring(devpriv->mite); - if (devpriv->ai_mite_ring == NULL) + if (!devpriv->ai_mite_ring) return -ENOMEM; devpriv->ao_mite_ring = mite_alloc_ring(devpriv->mite); - if (devpriv->ao_mite_ring == NULL) + if (!devpriv->ao_mite_ring) return -ENOMEM; devpriv->cdo_mite_ring = mite_alloc_ring(devpriv->mite); - if (devpriv->cdo_mite_ring == NULL) + if (!devpriv->cdo_mite_ring) return -ENOMEM; devpriv->gpct_mite_ring[0] = mite_alloc_ring(devpriv->mite); - if (devpriv->gpct_mite_ring[0] == NULL) + if (!devpriv->gpct_mite_ring[0]) return -ENOMEM; devpriv->gpct_mite_ring[1] = mite_alloc_ring(devpriv->mite); - if (devpriv->gpct_mite_ring[1] == NULL) + if (!devpriv->gpct_mite_ring[1]) return -ENOMEM; if (devpriv->is_m_series)