Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci agpopen(): check for NULL softc before dereferen...
details: https://anonhg.NetBSD.org/src/rev/d94bd13b80c9
branches: trunk
changeset: 515003:d94bd13b80c9
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Sep 15 18:03:35 2001 +0000
description:
agpopen(): check for NULL softc before dereferencing it.
diffstat:
sys/dev/pci/agp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r c0e367291da0 -r d94bd13b80c9 sys/dev/pci/agp.c
--- a/sys/dev/pci/agp.c Sat Sep 15 17:51:02 2001 +0000
+++ b/sys/dev/pci/agp.c Sat Sep 15 18:03:35 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: agp.c,v 1.8 2001/09/15 13:01:44 drochner Exp $ */
+/* $NetBSD: agp.c,v 1.9 2001/09/15 18:03:35 thorpej Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
@@ -766,6 +766,9 @@
{
struct agp_softc *sc = device_lookup(&agp_cd, AGPUNIT(dev));
+ if (sc == NULL)
+ return ENXIO;
+
if (sc->as_chipc == NULL)
return ENXIO;
Home |
Main Index |
Thread Index |
Old Index