diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-01-03 14:05:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-01-03 14:05:01 +0000 |
commit | b11aced460f181abd0ce4b9319145c01d92c31fd (patch) | |
tree | c4bc5b9c8b21779dc59cd21fefccee2364a49f6f /sys/dev/pci | |
parent | 0cc24b5630ce9c790508142c9abf525242a7a618 (diff) |
also bail if sc_chipc is NULL; spotted by miod
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/agp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 1d3dde15a28..f6d151ea857 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.3 2007/01/02 22:22:19 deraadt Exp $ */ +/* $OpenBSD: agp.c,v 1.4 2007/01/03 14:05:00 deraadt Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -146,7 +146,7 @@ agp_ioctl(void *v, u_long cmd, caddr_t addr, int flag, struct proc *pb) vsize_t size; int error = 0; - if (sc->sc_methods == NULL) + if (sc->sc_methods == NULL || sc->sc_chipc == NULL) return (ENXIO); switch (cmd) { |