diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-08-30 08:08:23 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-08-30 08:08:23 +0000 |
commit | a09c4ad27ff34dfd76bcaefe2a8ccc899d601709 (patch) | |
tree | d8840362df34b7dbcd5f70cda2645f3340a0efb5 /sys/dev | |
parent | 9b39efd26684f6089987d8c4ff0977764a7828a3 (diff) |
only do copyout() if wi_get_debug() returned 0.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/if_wi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index 3120f260c48..7f58fe7e81d 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.77 2002/08/13 03:49:51 millert Exp $ */ +/* $OpenBSD: if_wi.c,v 1.78 2002/08/30 08:08:22 fgsch Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.77 2002/08/13 03:49:51 millert Exp $"; + "$OpenBSD: if_wi.c,v 1.78 2002/08/30 08:08:22 fgsch Exp $"; #endif /* lint */ #ifdef foo @@ -1617,7 +1617,8 @@ wi_ioctl(ifp, command, data) break; } error = wi_get_debug(sc, &wreq); - error = copyout(&wreq, ifr->ifr_data, sizeof(wreq)); + if (error == 0) + error = copyout(&wreq, ifr->ifr_data, sizeof(wreq)); break; case SIOCSPRISM2DEBUG: error = copyin(ifr->ifr_data, &wreq, sizeof(wreq)); |