drm/etnaviv: simplify unbind checks
authorLucas Stach <l.stach@pengutronix.de>
Fri, 5 Jul 2019 17:17:20 +0000 (19:17 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 15 Aug 2019 08:54:07 +0000 (10:54 +0200)
commitdb41fe7d2f75c946a0b138aa789ca7cf6cd8afc1
tree4ee096f9ad071bcd3f3fdecd2ed66517374773a1
parent3001eeb7f216f404d5c459876131d3d48f3c12fc
drm/etnaviv: simplify unbind checks

Remember if the GPU has been sucessfully initialized. Only in that case
do we need to clean up various structures in the unbind path. If the
GPU hasn't been sucessfully initialized all the cleanups should happen
in the failure paths of the init function.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Guido Günther <agx@sigxcpu.org>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c
drivers/gpu/drm/etnaviv/etnaviv_gpu.h