From owner-svn-src-all@FreeBSD.ORG Tue Aug 5 11:50:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1693EE69 for ; Tue, 5 Aug 2014 11:50:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E05AD2B91 for ; Tue, 5 Aug 2014 11:50:16 +0000 (UTC) Received: from n_hibma (uid 745) (envelope-from n_hibma@FreeBSD.org) id 554f by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 05 Aug 2014 11:50:16 +0000 From: Nick Hibma Date: Tue, 5 Aug 2014 11:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269582 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e0c4f8.554f.7d534c18@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 11:50:17 -0000 Author: n_hibma Date: Tue Aug 5 11:50:16 2014 New Revision: 269582 URL: http://svnweb.freebsd.org/changeset/base/269582 Log: don't OR integer error values together as this does not make sense. Instead bail on the first failed command. Modified: head/sys/dev/usb/serial/u3g.c Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Tue Aug 5 10:48:53 2014 (r269581) +++ head/sys/dev/usb/serial/u3g.c Tue Aug 5 11:50:16 2014 (r269582) @@ -754,7 +754,8 @@ u3g_test_autoinst(void *arg, struct usb_ break; case U3GINIT_ZTESTOR: error = usb_msc_eject(udev, 0, MSC_EJECT_STOPUNIT); - error |= usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); + if (error == 0) + error = usb_msc_eject(udev, 0, MSC_EJECT_ZTESTOR); break; case U3GINIT_CMOTECH: error = usb_msc_eject(udev, 0, MSC_EJECT_CMOTECH);