summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Longeau <chl@cvs.openbsd.org>2011-05-02 22:20:21 +0000
committerCharles Longeau <chl@cvs.openbsd.org>2011-05-02 22:20:21 +0000
commit5689b0d4d1aef8276eb576984e6acd3f14fe8e48 (patch)
tree1690a334ede3b61c12c9cc8921cee57db1468e85
parentc4086e4a3166d170c5f14f215f72b5388875b1f4 (diff)
Fix a tyop which could potentially lead to null dereference.
While there fix a dead store. Found by LLVM/Clang Static Analyzer. ok deraadt@
-rw-r--r--sys/dev/pcmcia/if_ray.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c
index d3fde4b6003..88c59fd0285 100644
--- a/sys/dev/pcmcia/if_ray.c
+++ b/sys/dev/pcmcia/if_ray.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ray.c,v 1.45 2010/09/07 16:21:46 deraadt Exp $ */
+/* $OpenBSD: if_ray.c,v 1.46 2011/05/02 22:20:20 chl Exp $ */
/* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */
/*
@@ -837,7 +837,7 @@ ray_stop(struct ray_softc *sc)
wakeup(ray_report_params);
}
if (sc->sc_updreq) {
- sc->sc_repreq->r_failcause = RAY_FAILCAUSE_EDEVSTOP;
+ sc->sc_updreq->r_failcause = RAY_FAILCAUSE_EDEVSTOP;
wakeup(ray_update_params);
}
@@ -1295,7 +1295,7 @@ ray_intr_start(struct ray_softc *sc)
if (firsti == RAY_CCS_LINK_NULL)
return;
- i = 0;
+
if (!RAY_ECF_READY(sc)) {
/*
* if this can really happen perhaps we need to save