]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: addi_apci_3120: don't allocate 2nd DMA buffer on failure
authorIan Abbott <abbotti@mev.co.uk>
Fri, 12 Sep 2014 11:19:54 +0000 (12:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2014 22:39:39 +0000 (15:39 -0700)
commit7752f480a1fb60e1e64b351bd9ab9a8e3127c388
tree4582598068bdb772d57ea28c6ad641f8ab265d32
parent01b4a6396aec99b42b0ab144f7a55e6803d8e0be
staging: comedi: addi_apci_3120: don't allocate 2nd DMA buffer on failure

`apci3120_auto_attach()` 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/addi_apci_3120.c