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 0581a48..8d401ba 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