diff options
author | nate <nate@FreeBSD.org> | 1998-04-08 15:00:02 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1998-04-08 15:00:02 +0000 |
commit | 4c738b0efc841088a79d0a7bd37d6617f0b37f4b (patch) | |
tree | bfe3e89861a629b20900245d37f4e10be2a48532 /sys/pccard/pccard.c | |
parent | 00093086698541b358b8c8ee4fec8d538357e56f (diff) | |
download | FreeBSD-src-4c738b0efc841088a79d0a7bd37d6617f0b37f4b.zip FreeBSD-src-4c738b0efc841088a79d0a7bd37d6617f0b37f4b.tar.gz |
- Fix bug I introduced a few months ago. If a driver fails the probe,
correctly unregister the interrupt from the system.
[ My fix is much simpler than the one provided in the PR ]
PR: 6249
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 134ce5e..d4e453d 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pccard.c,v 1.55 1998/01/24 02:54:45 eivind Exp $ + * $Id: pccard.c,v 1.56 1998/02/25 05:58:50 bde Exp $ */ #include "opt_devfs.h" @@ -562,6 +562,7 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) slt->ctrl->mapirq(slt, slt->irq); } } + devi->running = 1; MALLOC(devi, struct pccard_devinfo *, sizeof(*devi), M_DEVBUF, M_WAITOK); bzero(devi, sizeof(*devi)); /* @@ -594,12 +595,11 @@ allocate_driver(struct slot *slt, struct dev_desc *desc) * If the enable functions returns no error, then the * device has been successfully installed. If so, then * attach it to the slot, otherwise free it and return - * the error. + * the error. We assume that when we free the device, + * it will also set 'running' to off. */ if (err) remove_device(devi); - else - devi->running = 1; return(err); } |