From 90e2889c4e24e2bde8f226402b46c66e18162860 Mon Sep 17 00:00:00 2001 From: Martin Peres Date: Sat, 20 Oct 2012 11:03:36 +0200 Subject: [PATCH] drm/nouveau/bios: improve error handling when reading the vbios from ACPI Reported-by: Pawel Sikora Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/subdev/bios/base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c index dcb5c2befc92..f65bfedcce66 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c @@ -188,8 +188,10 @@ nouveau_bios_shadow_acpi(struct nouveau_bios *bios) int ret, cnt, i; u8 data[3]; - if (!nouveau_acpi_rom_supported(pdev)) + if (!nouveau_acpi_rom_supported(pdev)) { + bios->data = NULL; return; + } bios->size = 0; if (nouveau_acpi_get_bios_chunk(data, 0, 3) == 3) -- 2.30.2