Date: Wed, 8 Jun 2016 12:40:21 +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: r301604 - head/sys/dev/sfxge/common Message-ID: <201606081240.u58CeLPJ017732@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Wed Jun 8 12:40:21 2016 New Revision: 301604 URL: https://svnweb.freebsd.org/changeset/base/301604 Log: sfxge(4): cleanup: add missing probes to ef10_nvram_segment_write_tlv Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Modified: head/sys/dev/sfxge/common/ef10_nvram.c Modified: head/sys/dev/sfxge/common/ef10_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_nvram.c Wed Jun 8 11:58:03 2016 (r301603) +++ head/sys/dev/sfxge/common/ef10_nvram.c Wed Jun 8 12:40:21 2016 (r301604) @@ -1658,7 +1658,7 @@ ef10_nvram_partn_write_tlv( * Read a segment from nvram at the given offset into a buffer (segment_data) * and optionally write a new tag to it. */ - static __checkReturn efx_rc_t +static __checkReturn efx_rc_t ef10_nvram_segment_write_tlv( __in efx_nic_t *enp, __in uint32_t partn, @@ -1684,20 +1684,25 @@ ef10_nvram_segment_write_tlv( */ status = ef10_nvram_read_tlv_segment(enp, partn, *partn_offsetp, *seg_datap, *src_remain_lenp); - if (status != 0) - return (EINVAL); + if (status != 0) { + rc = EINVAL; + goto fail1; + } status = ef10_nvram_buf_segment_size(*seg_datap, *src_remain_lenp, &original_segment_size); - if (status != 0) - return (EINVAL); + if (status != 0) { + rc = EINVAL; + goto fail2; + } if (write) { /* Update the contents of the segment in the buffer */ if ((rc = ef10_nvram_buf_write_tlv(*seg_datap, *dest_remain_lenp, tag, data, size, - &modified_segment_size)) != 0) - goto fail1; + &modified_segment_size)) != 0) { + goto fail3; + } *dest_remain_lenp -= modified_segment_size; *seg_datap += modified_segment_size; } else { @@ -1714,6 +1719,10 @@ ef10_nvram_segment_write_tlv( return (0); +fail3: + EFSYS_PROBE(fail3); +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?201606081240.u58CeLPJ017732>