diff options
author | Shahed Shaikh <shahed.shaikh@qlogic.com> | 2015-08-07 07:17:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-10 13:34:28 -0700 |
commit | 0e90ad9bfdcc8835945ccb49f39c21ff3cb0b785 (patch) | |
tree | a9a2e73ef13b8ca4be486a279c57dc3f549183c2 /drivers | |
parent | da286a6fd1e6913779c0a479f428ec3763dfc16c (diff) | |
download | linux-0e90ad9bfdcc8835945ccb49f39c21ff3cb0b785.tar.bz2 |
qlcnic: Don't use kzalloc unncecessarily for allocating large chunk of memory
Driver allocates a large chunk of temporary buffer using kzalloc
to copy FW image. As there is no real need of this memory to be
physically contiguous, use vzalloc instead.
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c index 753ea8bad953..bf892160dd5f 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c @@ -1384,7 +1384,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter) size_t size; u64 addr; - temp = kzalloc(fw->size, GFP_KERNEL); + temp = vzalloc(fw->size); if (!temp) { release_firmware(fw); fw_info->fw = NULL; @@ -1430,7 +1430,7 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter) exit: release_firmware(fw); fw_info->fw = NULL; - kfree(temp); + vfree(temp); return ret; } |