Skip to content

Commit 3d006ee

Browse files
committed
Merge tag 'drm-fixes-2020-10-08' of git://anongit.freedesktop.org/drm/drm
Pull drm nouveau fixes from Dave Airlie: "Karol found two last minute nouveau fixes, they both fix crashes, the TTM one follows what other drivers do already, and the other is for bailing on load on unrecognised chipsets. - fix crash in TTM alloc fail path - return error earlier for unknown chipsets" * tag 'drm-fixes-2020-10-08' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/mem: guard against NULL pointer access in mem_del drm/nouveau/device: return error for unknown chipsets
2 parents b9e3aa2 + d10285a commit 3d006ee

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/gpu/drm/nouveau/nouveau_mem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ void
176176
nouveau_mem_del(struct ttm_mem_reg *reg)
177177
{
178178
struct nouveau_mem *mem = nouveau_mem(reg);
179+
if (!mem)
180+
return;
179181
nouveau_mem_fini(mem);
180182
kfree(reg->mm_node);
181183
reg->mm_node = NULL;

drivers/gpu/drm/nouveau/nvkm/engine/device/base.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,6 +3149,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
31493149
case 0x168: device->chip = &nv168_chipset; break;
31503150
default:
31513151
nvdev_error(device, "unknown chipset (%08x)\n", boot0);
3152+
ret = -ENODEV;
31523153
goto done;
31533154
}
31543155

0 commit comments

Comments
 (0)