* 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:
parent
6ce29ffc97
commit
13e2521356
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user