diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c b/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c index 1ad5906c10..6fe2c5b5ec 100644 --- a/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c +++ b/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2154,6 +2154,17 @@ usbvc_parse_ctrl_if(usbvc_state_t *usbvcp) } } + /* + * For webcam which is not compliant to video class specification + * and no header descriptor in VC interface, return USB_FAILURE. + */ + if (!usbvcp->usbvc_vc_header) { + USB_DPRINTF_L2(PRINT_MASK_ATTA, usbvcp->usbvc_log_handle, + "usbvc_parse_ctrl_if: no header descriptor"); + + return (USB_FAILURE); + } + return (USB_SUCCESS); } |