etnaviv: fix a null pointer dereference
This issue was found by cppcheck Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
This commit is contained in:
committed by
Lucas Stach
parent
74470baebb
commit
dc471f2ef8
@@ -238,11 +238,11 @@ out_unlock:
|
||||
/* destroy a buffer object */
|
||||
void etna_bo_del(struct etna_bo *bo)
|
||||
{
|
||||
struct etna_device *dev = bo->dev;
|
||||
|
||||
if (!bo)
|
||||
return;
|
||||
|
||||
struct etna_device *dev = bo->dev;
|
||||
|
||||
if (!p_atomic_dec_zero(&bo->refcnt))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user