Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2011 13:46:41 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r224520 - head/sys/dev/ath/ath_dfs/null
Message-ID:  <201107301346.p6UDkfsq002547@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107301346.p6UDkfsq002547>