Skip to content

Commit e1feda1

Browse files
Malcolm Priestleygregkh
authored andcommitted
staging: vt6656: return if pControlURB->hcpriv not NULL
Fixes occasional urb submitted while active. Even thought the fMP_CONTROL_WRITES/fMP_CONTROL_READS flags are cleared in the return context urb->hcpriv is not NULL. check for hcpriv and return STATUS_FAILURE if not NULL. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 60cc274 commit e1feda1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/staging/vt6656/usbpipe.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ int PIPEnsControlOut(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
118118
if (pDevice->Flags & fMP_CONTROL_READS)
119119
return STATUS_FAILURE;
120120

121+
if (pDevice->pControlURB->hcpriv)
122+
return STATUS_FAILURE;
123+
121124
MP_SET_FLAG(pDevice, fMP_CONTROL_WRITES);
122125

123126
pDevice->sUsbCtlRequest.bRequestType = 0x40;
@@ -177,6 +180,9 @@ int PIPEnsControlIn(struct vnt_private *pDevice, u8 byRequest, u16 wValue,
177180
if (pDevice->Flags & fMP_CONTROL_WRITES)
178181
return STATUS_FAILURE;
179182

183+
if (pDevice->pControlURB->hcpriv)
184+
return STATUS_FAILURE;
185+
180186
MP_SET_FLAG(pDevice, fMP_CONTROL_READS);
181187

182188
pDevice->sUsbCtlRequest.bRequestType = 0xC0;

0 commit comments

Comments
 (0)