agp - fix potential panic
authorAlex Hornung <ahornung@gmail.com>
Fri, 24 Feb 2012 19:49:10 +0000 (19:49 +0000)
committerAlex Hornung <ahornung@gmail.com>
Fri, 24 Feb 2012 19:49:10 +0000 (19:49 +0000)
commitad9779b7172033d90ee85e64e3ab9965e2ed205d
tree3765d2cb4875ebd98d0987b4ba541fadb1f1b821
parent3f35aa53956f97f6b4fd793dc559118731dca1c9
agp - fix potential panic

 * Fix a potential panic when close() is called on an agp device that
   hasn't been opened.

 * Check whether it's open (and has been busied) before trying to unbusy
   it.

Reported-by: Pierre Abbat
DragonFly-bug: http://bugs.dragonflybsd.org/issue2310
sys/dev/agp/agp.c