diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2010-01-07 14:58:56 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-01-11 00:09:02 -0500 |
commit | 3d4a7882b11299104a0e74425dece2e26ac98024 (patch) | |
tree | e530148d5def57faaef318e6d73572c221256fcc /drivers/char | |
parent | 67fe63b0715ccfaefa0af8a6e705c5470ee5cada (diff) |
agp/hp: fail gracefully if we don't find an IOC
Bail out if we don't find an enclosing IOC. Previously, if we didn't
find one, we tried to set things up using garbage for the SBA/IOC register
address, which causes a crash.
This crash only happens if firmware supplies a defective ACPI namespace, so
it doesn't fix any problems in the field.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/agp/hp-agp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index dc8a6f70483b..58752b70efea 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c | |||
@@ -508,6 +508,9 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) | |||
508 | handle = parent; | 508 | handle = parent; |
509 | } while (ACPI_SUCCESS(status)); | 509 | } while (ACPI_SUCCESS(status)); |
510 | 510 | ||
511 | if (ACPI_FAILURE(status)) | ||
512 | return AE_OK; /* found no enclosing IOC */ | ||
513 | |||
511 | if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa)) | 514 | if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa)) |
512 | return AE_OK; | 515 | return AE_OK; |
513 | 516 | ||