Commit 854472c2 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: cb_pcidas64: (!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 4d719cec
...@@ -1473,7 +1473,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) ...@@ -1473,7 +1473,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
devpriv->ai_buffer[i] = devpriv->ai_buffer[i] =
pci_alloc_consistent(pcidev, DMA_BUFFER_SIZE, pci_alloc_consistent(pcidev, DMA_BUFFER_SIZE,
&devpriv->ai_buffer_bus_addr[i]); &devpriv->ai_buffer_bus_addr[i]);
if (devpriv->ai_buffer[i] == NULL) if (!devpriv->ai_buffer[i])
return -ENOMEM; return -ENOMEM;
} }
...@@ -1483,7 +1483,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) ...@@ -1483,7 +1483,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
pci_alloc_consistent(pcidev, DMA_BUFFER_SIZE, pci_alloc_consistent(pcidev, DMA_BUFFER_SIZE,
&devpriv-> &devpriv->
ao_buffer_bus_addr[i]); ao_buffer_bus_addr[i]);
if (devpriv->ao_buffer[i] == NULL) if (!devpriv->ao_buffer[i])
return -ENOMEM; return -ENOMEM;
} }
...@@ -1493,7 +1493,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) ...@@ -1493,7 +1493,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
pci_alloc_consistent(pcidev, sizeof(struct plx_dma_desc) * pci_alloc_consistent(pcidev, sizeof(struct plx_dma_desc) *
ai_dma_ring_count(thisboard), ai_dma_ring_count(thisboard),
&devpriv->ai_dma_desc_bus_addr); &devpriv->ai_dma_desc_bus_addr);
if (devpriv->ai_dma_desc == NULL) if (!devpriv->ai_dma_desc)
return -ENOMEM; return -ENOMEM;
if (ao_cmd_is_supported(thisboard)) { if (ao_cmd_is_supported(thisboard)) {
...@@ -1502,7 +1502,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev) ...@@ -1502,7 +1502,7 @@ static int alloc_and_init_dma_members(struct comedi_device *dev)
sizeof(struct plx_dma_desc) * sizeof(struct plx_dma_desc) *
AO_DMA_RING_COUNT, AO_DMA_RING_COUNT,
&devpriv->ao_dma_desc_bus_addr); &devpriv->ao_dma_desc_bus_addr);
if (devpriv->ao_dma_desc == NULL) if (!devpriv->ao_dma_desc)
return -ENOMEM; return -ENOMEM;
} }
/* initialize dma descriptors */ /* initialize dma descriptors */
...@@ -2975,7 +2975,7 @@ static void handle_ao_interrupt(struct comedi_device *dev, ...@@ -2975,7 +2975,7 @@ static void handle_ao_interrupt(struct comedi_device *dev,
unsigned long flags; unsigned long flags;
/* board might not support ao, in which case write_subdev is NULL */ /* board might not support ao, in which case write_subdev is NULL */
if (s == NULL) if (!s)
return; return;
async = s->async; async = s->async;
cmd = &async->cmd; cmd = &async->cmd;
......
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