File tree 1 file changed +12
-0
lines changed
drivers/media/usb/pvrusb2 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3642,6 +3642,12 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
3642
3642
hdw );
3643
3643
hdw -> ctl_write_urb -> actual_length = 0 ;
3644
3644
hdw -> ctl_write_pend_flag = !0 ;
3645
+ if (usb_urb_ep_type_check (hdw -> ctl_write_urb )) {
3646
+ pvr2_trace (
3647
+ PVR2_TRACE_ERROR_LEGS ,
3648
+ "Invalid write control endpoint" );
3649
+ return - EINVAL ;
3650
+ }
3645
3651
status = usb_submit_urb (hdw -> ctl_write_urb ,GFP_KERNEL );
3646
3652
if (status < 0 ) {
3647
3653
pvr2_trace (PVR2_TRACE_ERROR_LEGS ,
@@ -3666,6 +3672,12 @@ status);
3666
3672
hdw );
3667
3673
hdw -> ctl_read_urb -> actual_length = 0 ;
3668
3674
hdw -> ctl_read_pend_flag = !0 ;
3675
+ if (usb_urb_ep_type_check (hdw -> ctl_read_urb )) {
3676
+ pvr2_trace (
3677
+ PVR2_TRACE_ERROR_LEGS ,
3678
+ "Invalid read control endpoint" );
3679
+ return - EINVAL ;
3680
+ }
3669
3681
status = usb_submit_urb (hdw -> ctl_read_urb ,GFP_KERNEL );
3670
3682
if (status < 0 ) {
3671
3683
pvr2_trace (PVR2_TRACE_ERROR_LEGS ,
You can’t perform that action at this time.
0 commit comments