Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 06:46: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: r310741 - head/sys/dev/sfxge/common
Message-ID:  <201612290646.uBT6kLfk045829@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Thu Dec 29 06:46:20 2016
New Revision: 310741
URL: https://svnweb.freebsd.org/changeset/base/310741

Log:
  sfxge(4): fix misuse of siena_build_filter in common code
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Reviewed by:    gnn
  Sponsored by:   Solarflare Communications, Inc.
  MFC after:      2 days
  Differential Revision:  https://reviews.freebsd.org/D8937

Modified:
  head/sys/dev/sfxge/common/efx_filter.c

Modified: head/sys/dev/sfxge/common/efx_filter.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_filter.c	Thu Dec 29 06:45:36 2016	(r310740)
+++ head/sys/dev/sfxge/common/efx_filter.c	Thu Dec 29 06:46:20 2016	(r310741)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612290646.uBT6kLfk045829>