qlcnic: Free up memory in error path.
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Sat, 3 Aug 2013 03:15:56 +0000 (23:15 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Aug 2013 19:03:03 +0000 (12:03 -0700)
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c

index 0581a484ceb519dc8e6b11b6d08b06e4461bab46..8d401babd4913e7c10db75306a92ce2739e86fe5 100644 (file)
@@ -210,10 +210,10 @@ int qlcnic_fw_cmd_set_drv_version(struct qlcnic_adapter *adapter, u32 fw_cmd)
        if (err) {
                dev_info(&adapter->pdev->dev,
                         "Failed to set driver version in firmware\n");
-               return -EIO;
+               err = -EIO;
        }
-
-       return 0;
+       qlcnic_free_mbx_args(&cmd);
+       return err;
 }
 
 int