svn commit: r215985 - stable/8/sys/dev/usb

Andrew Thompson thompsa at FreeBSD.org
Sun Nov 28 07:23:06 UTC 2010


Author: thompsa
Date: Sun Nov 28 07:23:05 2010
New Revision: 215985
URL: http://svn.freebsd.org/changeset/base/215985

Log:
  MFC r213431
  
   Correct IOCTL return code.

Modified:
  stable/8/sys/dev/usb/usb_dev.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/usb/usb_dev.c
==============================================================================
--- stable/8/sys/dev/usb/usb_dev.c	Sun Nov 28 07:19:11 2010	(r215984)
+++ stable/8/sys/dev/usb/usb_dev.c	Sun Nov 28 07:23:05 2010	(r215985)
@@ -1479,7 +1479,7 @@ usb_static_ioctl(struct cdev *dev, u_lon
 		struct usb_read_dir *urd;
 		void* data;
 	} u;
-	int err = ENOTTY;
+	int err;
 
 	u.data = data;
 	switch (cmd) {
@@ -1495,6 +1495,7 @@ usb_static_ioctl(struct cdev *dev, u_lon
 			break;
 		case USB_GET_TEMPLATE:
 			*(int *)data = usb_template;
+			err = 0;
 			break;
 		case USB_SET_TEMPLATE:
 			err = priv_check(curthread, PRIV_DRIVER);
@@ -1502,6 +1503,9 @@ usb_static_ioctl(struct cdev *dev, u_lon
 				break;
 			usb_template = *(int *)data;
 			break;
+		default:
+			err = ENOTTY;
+			break;
 	}
 	return (err);
 }


More information about the svn-src-all mailing list