summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/gpu/drm/ast
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/gpu/drm/ast')
-rw-r--r--kernel/drivers/gpu/drm/ast/ast_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/drivers/gpu/drm/ast/ast_main.c b/kernel/drivers/gpu/drm/ast/ast_main.c
index e0b4586a2..9b8f0b975 100644
--- a/kernel/drivers/gpu/drm/ast/ast_main.c
+++ b/kernel/drivers/gpu/drm/ast/ast_main.c
@@ -223,7 +223,8 @@ static int ast_get_dram_info(struct drm_device *dev)
ast_write32(ast, 0x10000, 0xfc600309);
do {
- ;
+ if (pci_channel_offline(dev->pdev))
+ return -EIO;
} while (ast_read32(ast, 0x10000) != 0x01);
data = ast_read32(ast, 0x10004);
@@ -429,7 +430,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
ast_detect_chip(dev, &need_post);
if (ast->chip != AST1180) {
- ast_get_dram_info(dev);
+ ret = ast_get_dram_info(dev);
+ if (ret)
+ goto out_free;
ast->vram_size = ast_get_vram_info(dev);
DRM_INFO("dram %d %d %d %08x\n", ast->mclk, ast->dram_type, ast->dram_bus_width, ast->vram_size);
}