From: Junxin Chen chenjunxin1@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
----------------------------------
When we check arrays, we both check its value and its size, this patch fixes a bug when getting size of type.
Signed-off-by: Junxin Chen chenjunxin1@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_qos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_qos.c b/drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_qos.c index 0a98155..fb872de 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_qos.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_cae/hns3_cae_qos.c @@ -433,7 +433,7 @@ int hns3_cae_qcn_cfg(const struct hns3_nic_priv *net_priv, u32 out_size) { #define HCLGE_OPC_QCN_CFG 0x1A01 - bool check = !buf_in || in_size < sizeof(32); + bool check = !buf_in || in_size < sizeof(u32); struct hclge_vport *vport = NULL; struct hclge_dev *hdev = NULL; struct hclge_desc desc;