aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sfxge/common/efx_lic.c
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2016-05-16 06:19:17 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2016-05-16 06:19:17 +0000
commit7d4ce67a768203053f6889b66f78ccf44dc936ba (patch)
tree5e73a330f350b8c42f6884a7eb2ce9eb9da99895 /sys/dev/sfxge/common/efx_lic.c
parentfc3a62cf60996a7c0a811cc727b1bfe075dfcc3a (diff)
downloadsrc-7d4ce67a768203053f6889b66f78ccf44dc936ba.tar.gz
src-7d4ce67a768203053f6889b66f78ccf44dc936ba.zip
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. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6365
Notes
Notes: svn path=/head/; revision=299899
Diffstat (limited to 'sys/dev/sfxge/common/efx_lic.c')
-rw-r--r--sys/dev/sfxge/common/efx_lic.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/dev/sfxge/common/efx_lic.c b/sys/dev/sfxge/common/efx_lic.c
index 7ae270bbaf17..8dfbd86ce9bb 100644
--- a/sys/dev/sfxge/common/efx_lic.c
+++ b/sys/dev/sfxge/common/efx_lic.c
@@ -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);