Skip to content

Commit 65f50f9

Browse files
drm/vc4: Check for V3D before binner bo alloc
Check that we have a V3D device registered before attempting to allocate a binner buffer object. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-3-paul.kocialkowski@bootlin.com
1 parent 66fafd3 commit 65f50f9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_v3d.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ static int bin_bo_alloc(struct vc4_dev *vc4)
241241
int ret = 0;
242242
struct list_head list;
243243

244+
if (!v3d)
245+
return -ENODEV;
246+
244247
/* We may need to try allocating more than once to get a BO
245248
* that doesn't cross 256MB. Track the ones we've allocated
246249
* that failed so far, so that we can free them when we've got

0 commit comments

Comments
 (0)