svn commit: r224520 - head/sys/dev/ath/ath_dfs/null

Adrian Chadd adrian at FreeBSD.org
Sat Jul 30 13:46:42 UTC 2011


Author: adrian
Date: Sat Jul 30 13:46:41 2011
New Revision: 224520
URL: http://svn.freebsd.org/changeset/base/224520

Log:
  Fix incorrect error reporting during the dfs ioctl function.
  
  Approved by:	re (kib)

Modified:
  head/sys/dev/ath/ath_dfs/null/dfs_null.c

Modified: head/sys/dev/ath/ath_dfs/null/dfs_null.c
==============================================================================
--- head/sys/dev/ath/ath_dfs/null/dfs_null.c	Sat Jul 30 13:45:12 2011	(r224519)
+++ head/sys/dev/ath/ath_dfs/null/dfs_null.c	Sat Jul 30 13:46:41 2011	(r224520)
@@ -189,7 +189,7 @@ ath_ioctl_phyerr(struct ath_softc *sc, s
 	switch (id) {
 		case DFS_SET_THRESH:
 			if (insize < sizeof(HAL_PHYERR_PARAM)) {
-				error = -EINVAL;
+				error = EINVAL;
 				break;
 			}
 			pe = (HAL_PHYERR_PARAM *) indata;
@@ -203,12 +203,12 @@ ath_ioctl_phyerr(struct ath_softc *sc, s
 			memcpy(pe, &peout, sizeof(*pe));
 			break;
 		default:
-			error = -EINVAL;
+			error = EINVAL;
 	}
 	if (outsize < ad->ad_out_size)
 		ad->ad_out_size = outsize;
 	if (outdata && copyout(outdata, ad->ad_out_data, ad->ad_out_size))
-		error = -EFAULT;
+		error = EFAULT;
 bad:
 	if ((ad->ad_id & ATH_DIAG_IN) && indata != NULL)
 		free(indata, M_TEMP);


More information about the svn-src-all mailing list