Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 07:20:07 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295608 - head/sys/dev/usb/net
Message-ID:  <201602140720.u1E7K7bW040671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Feb 14 07:20:07 2016
New Revision: 295608
URL: https://svnweb.freebsd.org/changeset/base/295608

Log:
  Fix variable assignment inside if-clause in the smsc driver.
  Found by D5245 / PVS.
  
  MFC after:	1 week

Modified:
  head/sys/dev/usb/net/if_smsc.c

Modified: head/sys/dev/usb/net/if_smsc.c
==============================================================================
--- head/sys/dev/usb/net/if_smsc.c	Sun Feb 14 07:16:36 2016	(r295607)
+++ head/sys/dev/usb/net/if_smsc.c	Sun Feb 14 07:20:07 2016	(r295608)
@@ -1362,7 +1362,7 @@ smsc_chip_init(struct smsc_softc *sc)
 	/* Reset the PHY */
 	smsc_write_reg(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST);
 
-	if ((err = smsc_wait_for_bits(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST) != 0)) {
+	if ((err = smsc_wait_for_bits(sc, SMSC_PM_CTRL, SMSC_PM_CTRL_PHY_RST)) != 0) {
 		smsc_warn_printf(sc, "timed-out waiting for phy reset to complete\n");
 		goto init_failed;
 	}



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