File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
drivers/staging/isdn/gigaset Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -705,6 +705,12 @@ static int gigaset_probe(struct usb_interface *interface,
705
705
706
706
endpoint = & hostif -> endpoint [0 ].desc ;
707
707
708
+ if (!usb_endpoint_is_bulk_out (endpoint )) {
709
+ dev_err (& interface -> dev , "missing bulk-out endpoint\n" );
710
+ retval = - ENODEV ;
711
+ goto error ;
712
+ }
713
+
708
714
buffer_size = le16_to_cpu (endpoint -> wMaxPacketSize );
709
715
ucs -> bulk_out_size = buffer_size ;
710
716
ucs -> bulk_out_epnum = usb_endpoint_num (endpoint );
@@ -724,6 +730,12 @@ static int gigaset_probe(struct usb_interface *interface,
724
730
725
731
endpoint = & hostif -> endpoint [1 ].desc ;
726
732
733
+ if (!usb_endpoint_is_int_in (endpoint )) {
734
+ dev_err (& interface -> dev , "missing int-in endpoint\n" );
735
+ retval = - ENODEV ;
736
+ goto error ;
737
+ }
738
+
727
739
ucs -> busy = 0 ;
728
740
729
741
ucs -> read_urb = usb_alloc_urb (0 , GFP_KERNEL );
You can’t perform that action at this time.
0 commit comments