[PATCH] drm/nouveau/bios: improve error handling when reading thevbios from ACPI

From: Martin Peres
Date: Sat Oct 20 2012 - 05:03:36 EST


Reported-by: Pawel Sikora <pawel.sikora@xxxxxxxx>
Signed-off-by: Martin Peres <martin.peres@xxxxxxxx>
---
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 619e7e0..519a3b3 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)
--
1.7.12.4


--------------010808050707080104090307--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/