* Fix free NULL check style violations

* Remove linux style EINVAL


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42504 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-07-27 01:42:43 +00:00
parent 6ce29ffc97
commit 13e2521356
2 changed files with 10 additions and 15 deletions

View File

@ -70,7 +70,7 @@ BeceemDDR::DDRInit(WIMAX_DEVICE* swmxdevice)
break;
default:
return -EINVAL;
return B_BAD_VALUE;
}
break;
@ -169,7 +169,7 @@ BeceemDDR::DDRInit(WIMAX_DEVICE* swmxdevice)
break;
default:
return -EINVAL;
return B_BAD_VALUE;
}
break;
case 0xbece0310:
@ -209,13 +209,13 @@ BeceemDDR::DDRInit(WIMAX_DEVICE* swmxdevice)
break;
default:
return -EINVAL;
return B_BAD_VALUE;
}
break;
}
default:
return -EINVAL;
return B_BAD_VALUE;
}
value = 0;

View File

@ -270,17 +270,12 @@ BeceemDevice::~BeceemDevice()
if (fNotifyWriteSem >= B_OK)
delete_sem(fNotifyWriteSem);
if (fNotifyBuffer != NULL)
free(fNotifyBuffer);
// Free notification buffer
if (pwmxdevice->nvmFlashCSInfo != NULL)
free(pwmxdevice->nvmFlashCSInfo);
// Free flash configuration structure
if (pwmxdevice != NULL)
free(pwmxdevice);
// Free malloc of wimax device struct
free(fNotifyBuffer);
// Free notification buffer
free(pwmxdevice->nvmFlashCSInfo);
// Free flash configuration structure
free(pwmxdevice);
// Free malloc of wimax device struct
mutex_destroy(&gUSBLock);