git: d760d74dbed8 - main - ieee80211: Check for copyout() errors in the SIOCG80211STATS handler

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 19 Dec 2023 03:45:49 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=d760d74dbed81638979e662130e24111b3a5db0d

commit d760d74dbed81638979e662130e24111b3a5db0d
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-19 03:44:54 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-19 03:44:54 +0000

    ieee80211: Check for copyout() errors in the SIOCG80211STATS handler
    
    In preparation for annotating copyin() and related functions with
    __result_use_check.
    
    Reviewed by:    bz, emaste
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D43095
---
 sys/net80211/ieee80211_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 170cdc416276..d5b242b679d0 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -3636,8 +3636,8 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 		break;
 	case SIOCG80211STATS:
 		ifr = (struct ifreq *)data;
-		copyout(&vap->iv_stats, ifr_data_get_ptr(ifr),
-		    sizeof (vap->iv_stats));
+		error = copyout(&vap->iv_stats, ifr_data_get_ptr(ifr),
+		    sizeof(vap->iv_stats));
 		break;
 	case SIOCSIFMTU:
 		ifr = (struct ifreq *)data;