diff options
author | arybchik <arybchik@FreeBSD.org> | 2016-12-31 11:28:47 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2016-12-31 11:28:47 +0000 |
commit | 65741d388395f6c62c008a3515f4c812656ac04e (patch) | |
tree | bf45afb385ab5c1d0f39c98cde80a0af26d3f22f /sys/dev/sfxge | |
parent | 4cee6ef508a64d38fd4dd9247fb393054bac2fd5 (diff) | |
download | FreeBSD-src-65741d388395f6c62c008a3515f4c812656ac04e.zip FreeBSD-src-65741d388395f6c62c008a3515f4c812656ac04e.tar.gz |
MFC r310741
sfxge(4): fix misuse of siena_build_filter in common code
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Diffstat (limited to 'sys/dev/sfxge')
-rw-r--r-- | sys/dev/sfxge/common/efx_filter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/sfxge/common/efx_filter.c b/sys/dev/sfxge/common/efx_filter.c index 4ef0fcc..dd62b59 100644 --- a/sys/dev/sfxge/common/efx_filter.c +++ b/sys/dev/sfxge/common/efx_filter.c @@ -1179,6 +1179,7 @@ siena_filter_restore( efx_oword_t filter; int filter_idx; int state; + uint32_t key; efx_rc_t rc; EFSYS_LOCK(enp->en_eslp, state); @@ -1192,8 +1193,10 @@ siena_filter_restore( continue; spec = &sftp->sft_spec[filter_idx]; - if ((rc = siena_filter_build(&filter, spec)) != 0) + if ((key = siena_filter_build(&filter, spec)) == 0) { + rc = EINVAL; goto fail1; + } if ((rc = siena_filter_push_entry(enp, spec->sfs_type, filter_idx, &filter)) != 0) goto fail2; |