diff --git a/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDDR.cpp b/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDDR.cpp index 85307b3d04..87dba3b6ff 100644 --- a/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDDR.cpp +++ b/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDDR.cpp @@ -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; diff --git a/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp b/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp index ac1f0ac681..00d6b3dd89 100644 --- a/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp +++ b/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp @@ -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);