Commit bfbfeecc authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

Staging: vt6656: Hoist assign from if

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d2c6170b
......@@ -1434,7 +1434,8 @@ static int Config_FileGetParameter(UCHAR *string, UCHAR *dest,UCHAR *source)
source+=strlen(buf1);
//find target string start point
if((start_p = kstrstr(source,buf1))==NULL)
start_p = kstrstr(source,buf1);
if (start_p == NULL)
return FALSE;
//check if current config line is marked by "#" ??
......@@ -1446,7 +1447,8 @@ for(ii=1;;ii++) {
}
//find target string end point
if((end_p = kstrstr(start_p,"\n"))==NULL) { //cann't find "\n",but don't care
end_p = kstrstr(start_p,"\n");
if (end_p == NULL) { //can't find "\n",but don't care
end_p=start_p+strlen(start_p); //no include "\n"
}
......@@ -1455,7 +1457,8 @@ for(ii=1;;ii++) {
buf2[end_p-start_p]='\0';
//find value
if((start_p = kstrstr(buf2,"="))==NULL)
start_p = kstrstr(buf2,"=");
if (start_p == NULL)
return FALSE;
memset(buf1,0,100);
strcpy(buf1,start_p+1);
......@@ -1548,7 +1551,8 @@ static int Read_config_file(PSDevice pDevice) {
pDevice->config_file.eAuthenMode = -1;
pDevice->config_file.eEncryptionStatus = -1;
if((buffer=Config_FileOperation(pDevice)) ==NULL) {
buffer = Config_FileOperation(pDevice);
if (buffer == NULL) {
result =-1;
return result;
}
......
......@@ -193,7 +193,8 @@ PIPEnsControlOut(
usb_sndctrlpipe(pDevice->usb , 0), (char *) &pDevice->sUsbCtlRequest,
pbyBuffer, wLength, s_nsControlInUsbIoCompleteWrite, pDevice);
if ((ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC)) != 0) {
ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control send request submission failed: %d\n", ntStatus);
return STATUS_FAILURE;
}
......@@ -251,7 +252,8 @@ PIPEnsControlIn(
usb_rcvctrlpipe(pDevice->usb , 0), (char *) &pDevice->sUsbCtlRequest,
pbyBuffer, wLength, s_nsControlInUsbIoCompleteRead, pDevice);
if ((ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC)) != 0) {
ntStatus = usb_submit_urb(pDevice->pControlURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control request submission failed: %d\n", ntStatus);
}else {
MP_SET_FLAG(pDevice, fMP_CONTROL_READS);
......@@ -414,7 +416,8 @@ usb_fill_bulk_urb(pDevice->pInterruptURB,
#endif
#endif
if ((ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC)) != 0) {
ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit int URB failed %d\n", ntStatus);
}
......@@ -494,7 +497,8 @@ s_nsInterruptUsbIoCompleteRead(
if (pDevice->fKillEventPollingThread != TRUE) {
#if 0 //reserve int URB submit
if ((ntStatus = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
ntStatus = usb_submit_urb(urb, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Re-Submit int URB failed %d\n", ntStatus);
}
#else //replace int URB submit by bulk transfer
......@@ -507,7 +511,8 @@ s_nsInterruptUsbIoCompleteRead(
s_nsInterruptUsbIoCompleteRead,
pDevice);
if ((ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC)) != 0) {
ntStatus = usb_submit_urb(pDevice->pInterruptURB, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit int URB failed %d\n", ntStatus);
}
......@@ -572,7 +577,8 @@ PIPEnsBulkInUsbRead(
s_nsBulkInUsbIoCompleteRead,
pRCB);
if((ntStatus = usb_submit_urb(pUrb, GFP_ATOMIC)) != 0){
ntStatus = usb_submit_urb(pUrb, GFP_ATOMIC);
if (ntStatus != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Rx URB failed %d\n", ntStatus);
return STATUS_FAILURE ;
}
......@@ -718,7 +724,8 @@ PIPEnsSendBulkOut(
s_nsBulkOutIoCompleteWrite,
pContext);
if((status = usb_submit_urb(pUrb, GFP_ATOMIC))!=0)
status = usb_submit_urb(pUrb, GFP_ATOMIC);
if (status != 0)
{
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Tx URB failed %d\n", status);
return STATUS_FAILURE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment