Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 11:50:16 +0000 (UTC)
From:      Nick Hibma <n_hibma@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269582 - head/sys/dev/usb/serial
Message-ID:  <53e0c4f8.554f.7d534c18@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e0c4f8.554f.7d534c18>