staging: vt6656: s_vGetFreeContext remove pReturnContext
Just return the context from for loop. Return NULL if end reached. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aceaf01891
commit
5c851383b5
|
@ -141,7 +141,6 @@ static struct vnt_usb_send_context
|
||||||
*s_vGetFreeContext(struct vnt_private *pDevice)
|
*s_vGetFreeContext(struct vnt_private *pDevice)
|
||||||
{
|
{
|
||||||
struct vnt_usb_send_context *pContext = NULL;
|
struct vnt_usb_send_context *pContext = NULL;
|
||||||
struct vnt_usb_send_context *pReturnContext = NULL;
|
|
||||||
int ii;
|
int ii;
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
|
||||||
|
@ -153,15 +152,14 @@ static struct vnt_usb_send_context
|
||||||
if (pContext->bBoolInUse == false) {
|
if (pContext->bBoolInUse == false) {
|
||||||
pContext->bBoolInUse = true;
|
pContext->bBoolInUse = true;
|
||||||
memset(pContext->Data, 0, MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
|
memset(pContext->Data, 0, MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
|
||||||
pReturnContext = pContext;
|
return pContext;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ii == pDevice->cbTD ) {
|
if ( ii == pDevice->cbTD ) {
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Free Tx Context\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Free Tx Context\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return pReturnContext;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
|
static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
|
||||||
|
|
Loading…
Reference in New Issue