git: 509de5dc8a15 - stable/13 - cxgbe(4): Do not ignore the return value of ifmedia_ioctl.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Feb 2022 06:55:49 UTC
The branch stable/13 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=509de5dc8a156dd37b8e4ba88efc08942cf18458 commit 509de5dc8a156dd37b8e4ba88efc08942cf18458 Author: Navdeep Parhar <np@FreeBSD.org> AuthorDate: 2022-01-10 21:01:51 +0000 Commit: Navdeep Parhar <np@FreeBSD.org> CommitDate: 2022-02-28 06:50:03 +0000 cxgbe(4): Do not ignore the return value of ifmedia_ioctl. This ensures that the driver reports an error instead of failing silently when an invalid media is requested. Reported by: Suhas Lokesha @ Chelsio Sponsored by: Chelsio Communications (cherry picked from commit cdd7fe04cb803d49a2fb6389be70f4378ae3ca3b) --- sys/dev/cxgbe/t4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index b45f910afe88..078515833045 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2881,7 +2881,7 @@ fail: case SIOCSIFMEDIA: case SIOCGIFMEDIA: case SIOCGIFXMEDIA: - ifmedia_ioctl(ifp, ifr, &pi->media, cmd); + rc = ifmedia_ioctl(ifp, ifr, &pi->media, cmd); break; case SIOCGI2C: {