summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-04-10 15:48:45 +0000
committerrwatson <rwatson@FreeBSD.org>2007-04-10 15:48:45 +0000
commitfc1b9c146d4d1e857dc4eb0d4f003b3fd6600295 (patch)
tree1e2f5f7a39879bcf7de70264c63b0ab4bdb02cf6
parent7ce596985460737d3d4bc9fbc6175badda9e287d (diff)
downloadFreeBSD-src-fc1b9c146d4d1e857dc4eb0d4f003b3fd6600295.zip
FreeBSD-src-fc1b9c146d4d1e857dc4eb0d4f003b3fd6600295.tar.gz
Remove unnecessary suser() check in the sysctl to set up ath_hal
logging: the sysctl framework will already have checked for privilege if a sysctl value is being set. Discussed a long time ago with: sam
-rw-r--r--sys/dev/ath/ah_osdep.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/ath/ah_osdep.c b/sys/dev/ath/ah_osdep.c
index e580e2f..c5f31e36 100644
--- a/sys/dev/ath/ah_osdep.c
+++ b/sys/dev/ath/ah_osdep.c
@@ -199,16 +199,13 @@ ath_hal_setlogging(int enable)
int error;
if (enable) {
- error = suser(curthread);
- if (error == 0) {
- error = alq_open(&ath_hal_alq, ath_hal_logfile,
- curthread->td_ucred, ALQ_DEFAULT_CMODE,
- sizeof (struct athregrec), ath_hal_alq_qsize);
- ath_hal_alq_lost = 0;
- ath_hal_alq_emitdev = 1;
- printf("ath_hal: logging to %s enabled\n",
- ath_hal_logfile);
- }
+ error = alq_open(&ath_hal_alq, ath_hal_logfile,
+ curthread->td_ucred, ALQ_DEFAULT_CMODE,
+ sizeof (struct athregrec), ath_hal_alq_qsize);
+ ath_hal_alq_lost = 0;
+ ath_hal_alq_emitdev = 1;
+ printf("ath_hal: logging to %s enabled\n",
+ ath_hal_logfile);
} else {
if (ath_hal_alq)
alq_close(ath_hal_alq);
OpenPOWER on IntegriCloud