drm/nouveau/bios: improve error handling when reading the vbios from ACPI
authorMartin Peres <martin.peres@labri.fr>
Sat, 20 Oct 2012 09:03:36 +0000 (11:03 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 22 Oct 2012 02:25:49 +0000 (12:25 +1000)
Reported-by: Pawel Sikora <pawel.sikora@agmk.net>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/bios/base.c

index dcb5c2b..f65bfed 100644 (file)
@@ -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)