Skip to content

Commit

Permalink
agp/hp: fail gracefully if we don't find an IOC
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
Bjorn Helgaas authored and airlied committed Jan 11, 2010
1 parent 67fe63b commit 3d4a788
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/char/agp/hp-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret)
handle = parent;
} while (ACPI_SUCCESS(status));

if (ACPI_FAILURE(status))
return AE_OK; /* found no enclosing IOC */

if (hp_zx1_setup(sba_hpa + HP_ZX1_IOC_OFFSET, lba_hpa))
return AE_OK;

Expand Down

0 comments on commit 3d4a788

Please sign in to comment.