Skip to content

Commit c3e0276

Browse files
karolherbstairlied
authored andcommitted
drm/nouveau/device: return error for unknown chipsets
Previously the code relied on device->pri to be NULL and to fail probing later. We really should just return an error inside nvkm_device_ctor for unsupported GPUs. Fixes: 24d5ff4 ("drm/nouveau/device: rework mmio mapping code to get rid of second map") Signed-off-by: Karol Herbst <kherbst@redhat.com> Cc: dann frazier <dann.frazier@canonical.com> Cc: dri-devel <dri-devel@lists.freedesktop.org> Cc: Dave Airlie <airlied@redhat.com> Cc: stable@vger.kernel.org Reviewed-by: Jeremy Cline <jcline@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201006220528.13925-1-kherbst@redhat.com
1 parent 86fdf61 commit c3e0276

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/gpu/drm/nouveau/nvkm/engine/device

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)