diff options
author | Stefan Dirsch <sndirsch@suse.de> | 2014-03-18 11:58:39 +0100 |
---|---|---|
committer | Stefan Dirsch <sndirsch@suse.de> | 2014-03-18 11:58:39 +0100 |
commit | e54f2fdb7a44ffb40b3b4c2266843c38223c1f07 (patch) | |
tree | fc917719db3988fbd81a56bbb6df5e6dbbdfa858 /src/ast_driver.c | |
parent | a40c98a4838bdb5793922a13d980bd370427bd2d (diff) |
ast: fix falling back after kernel check
if we find a kernel driver the code leave the pci slot claimed which
stops us falling back. unclaim the pci slot. patch inspired by
correspondant patch for cirrus driver by Dave Airlie.
Signed-off-by: Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/ast_driver.c')
-rw-r--r-- | src/ast_driver.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ast_driver.c b/src/ast_driver.c index e0dd4fa..677c170 100644 --- a/src/ast_driver.c +++ b/src/ast_driver.c @@ -291,7 +291,10 @@ ASTProbe(DriverPtr drv, int flags) devSections, numDevSections, drv, &usedChips); - free(devSections); + if (numUsed <= 0) { + free(devSections); + return FALSE; + } if (flags & PROBE_DETECT) { if (numUsed > 0) @@ -310,6 +313,8 @@ ASTProbe(DriverPtr drv, int flags) pPci->device_id, pPci->bus, pPci->domain, pPci->dev, pPci->func); xf86DrvMsg(0, X_ERROR, "cirrus: This driver cannot operate until it has been unloaded.\n"); + xf86UnclaimPciSlot(pPci, devSections[0]); + free(devSections); return FALSE; } } @@ -343,6 +348,7 @@ ASTProbe(DriverPtr drv, int flags) } /* end of for-loop */ } /* end of if flags */ + free(devSections); free(usedChips); return foundScreen; |