diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2013-11-26 19:12:38 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-03 08:32:42 -0800 |
commit | 5c851383b5e5d43e2d24b9c22cdbbda9632dfa64 (patch) | |
tree | 9fe7a0b852f66dc69a5489957d2f6a5f61a60f55 | |
parent | aceaf01891776585d94222f3d62b8e138e23d604 (diff) |
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>
-rw-r--r-- | drivers/staging/vt6656/rxtx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 0e4b6fb2ec96..6534f753296a 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -141,7 +141,6 @@ static struct vnt_usb_send_context *s_vGetFreeContext(struct vnt_private *pDevice) { struct vnt_usb_send_context *pContext = NULL; - struct vnt_usb_send_context *pReturnContext = NULL; int ii; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); @@ -153,15 +152,14 @@ static struct vnt_usb_send_context if (pContext->bBoolInUse == false) { pContext->bBoolInUse = true; memset(pContext->Data, 0, MAX_TOTAL_SIZE_WITH_ALL_HEADERS); - pReturnContext = pContext; - break; + return pContext; } } if ( ii == pDevice->cbTD ) { 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, |