staging: ion: Prevent incorrect reference counting behavour
authorLee Jones <lee.jones@linaro.org>
Fri, 26 Nov 2021 10:33:35 +0000 (10:33 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 07:45:02 +0000 (08:45 +0100)
commit16b34e53eaadda6cbb1f0452fd99700c44db23be
tree4597c862fb1945a1bea866a4a4197fa05f14679a
parent5fd8594b3cefd966789dfebf8eb4311574fadbb9
staging: ion: Prevent incorrect reference counting behavour

Supply additional checks in order to prevent unexpected results.

Fixes: b892bf75b2034 ("ion: Switch ion to use dma-buf")
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c