staging: vt6656: s_nsBulkOutIoCompleteWrite Remove variable status.
Remove status and move debug messages to switch statement. Remove duplicate second debug message. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d597aaef2d
commit
d1b2a11d7a
|
@ -584,38 +584,29 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
|
||||||
struct vnt_usb_send_context *context = urb->context;
|
struct vnt_usb_send_context *context = urb->context;
|
||||||
struct vnt_private *priv = context->pDevice;
|
struct vnt_private *priv = context->pDevice;
|
||||||
u8 context_type = context->type;
|
u8 context_type = context->type;
|
||||||
int status;
|
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkOutIoCompleteWrite\n");
|
||||||
|
|
||||||
switch (urb->status) {
|
switch (urb->status) {
|
||||||
case 0:
|
case 0:
|
||||||
case -ETIMEDOUT:
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||||
|
"Write %d bytes\n", context->uBufLen);
|
||||||
break;
|
break;
|
||||||
case -ECONNRESET:
|
case -ECONNRESET:
|
||||||
case -ENOENT:
|
case -ENOENT:
|
||||||
case -ESHUTDOWN:
|
case -ESHUTDOWN:
|
||||||
context->bBoolInUse = false;
|
context->bBoolInUse = false;
|
||||||
return;
|
return;
|
||||||
|
case -ETIMEDOUT:
|
||||||
default:
|
default:
|
||||||
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||||
|
"BULK Out failed %d\n", urb->status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!netif_device_present(priv->dev))
|
if (!netif_device_present(priv->dev))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
status = urb->status;
|
|
||||||
|
|
||||||
if (status == STATUS_SUCCESS) {
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
|
||||||
"Write %d bytes\n", context->uBufLen);
|
|
||||||
} else {
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
|
||||||
"BULK Out failed %d\n", status);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (CONTEXT_DATA_PACKET == context_type) {
|
if (CONTEXT_DATA_PACKET == context_type) {
|
||||||
if (context->pPacket != NULL) {
|
if (context->pPacket != NULL) {
|
||||||
dev_kfree_skb_irq(context->pPacket);
|
dev_kfree_skb_irq(context->pPacket);
|
||||||
|
@ -625,11 +616,6 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->dev->trans_start = jiffies;
|
priv->dev->trans_start = jiffies;
|
||||||
|
|
||||||
if (status != STATUS_SUCCESS) {
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
|
||||||
"Send USB error! [%08xh]\n", status);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->bLinkPass == true) {
|
if (priv->bLinkPass == true) {
|
||||||
|
|
Loading…
Reference in New Issue