Staging: bcm: Return -ENOMEM instead of -1 when memory not acquired in nmv.c
authorKevin McKinney <klmckinney1@gmail.com>
Fri, 8 Jun 2012 03:52:42 +0000 (23:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jun 2012 17:50:52 +0000 (10:50 -0700)
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>
drivers/staging/bcm/nvm.c

index c8a0a9096a0e97d0677b194ccd6b53e5f0f801af..ed2316570d303140c124fb6734338d93394ee181 100644 (file)
@@ -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);
This page took 0.03044 seconds and 5 git commands to generate.