This patch changes the return statement on two
conditions where memory could not be acquired.
It returns -ENOMEM instead of -1.
Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
INT Status = 0;
if (pBuff == NULL)
- return -1;
+ return -ENOMEM;
if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, EEPROM_SIZE_OFFSET, 4)) {
kfree(pBuff);
pBuff = kmalloc(uiEepromSize, GFP_KERNEL);
if (pBuff == NULL)
- return -1;
+ return -ENOMEM;
if (0 != BeceemNVMRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiEepromSize)) {
kfree(pBuff);