staging: ion: Prevent incorrect reference counting behavour
authorLee Jones <lee.jones@linaro.org>
Mon, 25 Apr 2022 15:51:54 +0000 (16:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 11:53:57 +0000 (13:53 +0200)
commitfea24b07edfc348c67a019b6e17b39c0698e631f
tree8760be16732397982116549f69ed95ad79759edc
parentdccee748af17fc087ff5017152e532ef8e18c8c0
staging: ion: Prevent incorrect reference counting behavour

Supply additional check 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