From: Bruce Allan Date: Fri, 26 Feb 2021 21:19:27 +0000 (-0800) Subject: ice: fix memory allocation call X-Git-Tag: v5.15~1408^2~56^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59df14f9cc2326bd6432d60eca0df8201d9d3d4b;p=platform%2Fkernel%2Flinux-starfive.git ice: fix memory allocation call Fix the order of number of array members and member size parameters in a *calloc() call. Fixes: b3c3890489f6 ("ice: avoid unnecessary single-member variable-length structs") Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 3d9475e..a20edf1 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -717,8 +717,8 @@ static enum ice_status ice_cfg_fw_log(struct ice_hw *hw, bool enable) if (!data) { data = devm_kcalloc(ice_hw_to_dev(hw), - sizeof(*data), ICE_AQC_FW_LOG_ID_MAX, + sizeof(*data), GFP_KERNEL); if (!data) return ICE_ERR_NO_MEMORY;