]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: comedi: comedi_buf: factor out common code to free the async buffer
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 9 Jan 2013 20:25:54 +0000 (13:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:53:58 +0000 (16:53 -0800)
commit718c4d68d9491e8bc16a614d193b257efc41723e
tree7c7d39877c69041aaf49f91d2318862ed25141bd
parentea082fb1b0ee42b6430c83a6dc9d795381a87264
staging: comedi: comedi_buf: factor out common code to free the async buffer

The function comedi_buf_alloc() uses two loops to free the async buffer's
buf_page_list. The first one is used at the beginning to deallocate the
current buffer. The second is used to cleanup if the new buffer allocation
fails.

Factor out the common code to a new function.

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