From ea15dc1cf87236da78e8e88ecc3864ffab006ae0 Mon Sep 17 00:00:00 2001
From: Martin Peres <martin.peres@labri.fr>
Date: Sat, 20 Oct 2012 00:08:15 +0200
Subject: [PATCH] drm/nouveau/bios: improve error handling when reading the
vbios from ACPI
Reported-by: Pawel Sikora <pawel.sikora@agmk.net>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
---
drivers/gpu/drm/nouveau/core/subdev/bios/base.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -188,8 +188,10 @@ nouveau_bios_shadow_acpi(struct nouveau_bios *bios)
int cnt = 65536 / 4096;
int ret;
- if (!nouveau_acpi_rom_supported(pdev))
+ if (!nouveau_acpi_rom_supported(pdev)) {
+ bios->data = NULL;
return;
+ }
bios->data = kmalloc(65536, GFP_KERNEL);
bios->size = 0;
--
1.7.12.3