diff --git a/.pick_status.json b/.pick_status.json index cc62b822a64..a29bfe77e7f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1494,7 +1494,7 @@ "description": "freedreno/drm: don't crash for unsupported devices", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "48610676897d989ff8ce604022e7d611cec9c131", "notes": null diff --git a/src/freedreno/drm/freedreno_device.c b/src/freedreno/drm/freedreno_device.c index cff09fd8fbb..367e499b732 100644 --- a/src/freedreno/drm/freedreno_device.c +++ b/src/freedreno/drm/freedreno_device.c @@ -104,6 +104,9 @@ out: if (!use_heap) { struct fd_pipe *pipe = fd_pipe_new(dev, FD_PIPE_3D); + if (!pipe) + goto fail; + /* Userspace fences don't appear to be reliable enough (missing some * cache flushes?) on older gens, so limit sub-alloc heaps to a6xx+ * for now: @@ -119,6 +122,10 @@ out: } return dev; + +fail: + fd_device_del(dev); + return NULL; } /* like fd_device_new() but creates it's own private dup() of the fd