svn commit: r301362 - stable/10/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Sat Jun 4 16:24:15 UTC 2016
Author: arybchik
Date: Sat Jun 4 16:24:14 2016
New Revision: 301362
URL: https://svnweb.freebsd.org/changeset/base/301362
Log:
MFC r299899
sfxge(4): cleanup: make licensing function quieter
Silent handling of failure to invoke functions that are not supported on
older licensing versions.
Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Modified:
stable/10/sys/dev/sfxge/common/efx_lic.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/sfxge/common/efx_lic.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/efx_lic.c Sat Jun 4 16:22:03 2016 (r301361)
+++ stable/10/sys/dev/sfxge/common/efx_lic.c Sat Jun 4 16:24:14 2016 (r301362)
@@ -1437,17 +1437,14 @@ efx_lic_app_state(
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
- if (elop->elo_app_state == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
+ if (elop->elo_app_state == NULL)
+ return (ENOTSUP);
+
if ((rc = elop->elo_app_state(enp, app_id, licensedp)) != 0)
- goto fail2;
+ goto fail1;
return (0);
-fail2:
- EFSYS_PROBE(fail2);
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
@@ -1469,19 +1466,15 @@ efx_lic_get_id(
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC);
- if (elop->elo_get_id == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
+ if (elop->elo_get_id == NULL)
+ return (ENOTSUP);
if ((rc = elop->elo_get_id(enp, buffer_size, typep,
lengthp, bufferp)) != 0)
- goto fail2;
+ goto fail1;
return (0);
-fail2:
- EFSYS_PROBE(fail2);
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
More information about the svn-src-stable-10
mailing list