Date: Mon, 16 May 2016 06:19:17 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299899 - head/sys/dev/sfxge/common Message-ID: <201605160619.u4G6JH31057064@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Mon May 16 06:19:17 2016 New Revision: 299899 URL: https://svnweb.freebsd.org/changeset/base/299899 Log: 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 Modified: head/sys/dev/sfxge/common/efx_lic.c Modified: head/sys/dev/sfxge/common/efx_lic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_lic.c Mon May 16 06:17:56 2016 (r299898) +++ head/sys/dev/sfxge/common/efx_lic.c Mon May 16 06:19:17 2016 (r299899) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605160619.u4G6JH31057064>