diff options
author | Scott Thompson <postfail at hushmail.com> | 2007-08-25 10:14:00 +0200 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-08-25 10:14:00 +0200 |
commit | 5bdbc7dc2c07d507b41bffdadc2c8cc13b2d4326 (patch) | |
tree | 028f10ec31f041f97934c3fd6b66eabb81444ed8 /drivers/char/agp/ati-agp.c | |
parent | agp: Add device id for P4M900 to via-agp module (diff) | |
download | linux-5bdbc7dc2c07d507b41bffdadc2c8cc13b2d4326.tar.xz linux-5bdbc7dc2c07d507b41bffdadc2c8cc13b2d4326.zip |
agp: balance ioremap checks
patchset against 2.6.23-rc3.
corrects missing ioremap return checks and balancing on iounmap calls, integrated changes per list
recommendations on the original set of patches..
Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/agp/ati-agp.c')
-rw-r--r-- | drivers/char/agp/ati-agp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/agp/ati-agp.c b/drivers/char/agp/ati-agp.c index da7513d7b4e7..2d46b713c8f2 100644 --- a/drivers/char/agp/ati-agp.c +++ b/drivers/char/agp/ati-agp.c @@ -213,6 +213,9 @@ static int ati_configure(void) temp = (temp & 0xfffff000); ati_generic_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); + if (!ati_generic_private.registers) + return -ENOMEM; + if (is_r200()) pci_write_config_dword(agp_bridge->dev, ATI_RS100_IG_AGPMODE, 0x20000); else |