Commit 1dacc497 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Tony Nguyen

ice: Remove managed memory usage in ice_get_fw_log_cfg()

There is no need to use managed memory allocation here. The memory is
released at the end of the function.

Use kzalloc()/kfree() to simplify the code.
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent ad667d62
......@@ -833,7 +833,7 @@ static int ice_get_fw_log_cfg(struct ice_hw *hw)
u16 size;
size = sizeof(*config) * ICE_AQC_FW_LOG_ID_MAX;
config = devm_kzalloc(ice_hw_to_dev(hw), size, GFP_KERNEL);
config = kzalloc(size, GFP_KERNEL);
if (!config)
return -ENOMEM;
......@@ -856,7 +856,7 @@ static int ice_get_fw_log_cfg(struct ice_hw *hw)
}
}
devm_kfree(ice_hw_to_dev(hw), config);
kfree(config);
return status;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment