]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: adl_pci9118: don't allocate 2nd DMA buffer on failure
authorIan Abbott <abbotti@mev.co.uk>
Fri, 12 Sep 2014 09:04:42 +0000 (10:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 22:36:24 +0000 (15:36 -0700)
commit3462ab0b3f55f4bac16a560ca06f15b5180dab64
treeea1fad901c07cd3e2cd8ffcff65b3b4a27bb413e
parent9819a3480c458b315a961d4f41c38c5eac10c736
staging: comedi: adl_pci9118: don't allocate 2nd DMA buffer on failure

`pci9118_alloc_dma()` tries to allocate two DMA buffers but may allocate
a single buffer or none at all.  If it fails to allocate the first
buffer, it still tries to allocate the second buffer, even though it
won't be used.  Change it to not bother trying to allocate the second
buffer if the first one fails.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adl_pci9118.c