]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gpu: ion: Don't call ion_buffer_put on error path
authorLaura Abbott <lauraa@codeaurora.org>
Fri, 13 Dec 2013 22:23:57 +0000 (14:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:55:38 +0000 (08:55 -0800)
commit55808b8d4dbd907834ac11e4959ef7d7040c3982
tree905d05906907a2d1d02cf9d244f0b60363270a24
parenta1c6b996ec1d9c78ab58f189719e1674fea3d2fb
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.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
[jstultz: modified patch to apply to staging directory]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c