Staging: bcm: Return -ENOMEM instead of -1 when memory not acquired in nmv.c

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>
This commit is contained in:
Kevin McKinney 2012-06-07 23:52:42 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель 6788d7dab6
Коммит 7dd80eb925
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1378,7 +1378,7 @@ INT PropagateCalParamsFromEEPROMToMemory(struct bcm_mini_adapter *Adapter)
INT Status = 0;
if (pBuff == NULL)
return -1;
return -ENOMEM;
if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, EEPROM_SIZE_OFFSET, 4)) {
kfree(pBuff);
@ -1462,7 +1462,7 @@ INT PropagateCalParamsFromFlashToMemory(struct bcm_mini_adapter *Adapter)
pBuff = kmalloc(uiEepromSize, GFP_KERNEL);
if (pBuff == NULL)
return -1;
return -ENOMEM;
if (0 != BeceemNVMRead(Adapter, (PUINT)pBuff, uiCalStartAddr, uiEepromSize)) {
kfree(pBuff);