gpu: ion: Don't call ion_buffer_put on error path
authorLaura Abbott <lauraa@codeaurora.org>
Thu, 2 Aug 2012 01:06:18 +0000 (18:06 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:55 +0000 (13:40 -0700)
commit23aedd872e776de5529ff3fd756cff16b4420aef
tree6c669e669a6ed994df2171081c5b044b1b54fb0d
parente67efa45c6b06c6ac30c8a9c4194b00346f10789
gpu: ion: Don't call ion_buffer_put on error path

If dma_buf_fd fails, the dma_buf needs to be cleaned up by
calling dma_buf_put. dma_buf_put will call ion_dma_buf_release
which in turn calls ion_buffer_put to clean up the buffer
reference. Calling ion_buffer_put after dma_buf_put drops the
reference count by one more which is incorrect. Fix this by
getting rid of the extra ion_buffer_put call.

Change-Id: Ieb3a7b781bf2dc299c45384dbf0a12d186adeb22
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
drivers/gpu/ion/ion.c