drm/imagination: Move dereference after NULL check in pvr_mmu_backing_page_init()

This code dereferences "page->pvr_dev" and then checked for NULL on the
next line.  Re-order it to avoid a potential NULL pointer dereference.

Fixes: ff5f643de0 ("drm/imagination: Add GEM and VM related code")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/13f4278e-af9c-4092-9196-bc0e6b76f1eb@moroto.mountain
This commit is contained in:
Dan Carpenter 2023-12-06 17:37:24 +03:00 • committed by Maxime Ripard
commit fca9448ae2
No known key found for this signature in database
GPG key ID: E3EF0D6F671851C5