Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95b8e384 authored by Steve Wise's avatar Steve Wise Committed by Jason Gunthorpe
Browse files

iw_cxgb*: kzalloc the iwcm verbs struct



So future additions to that struct get initialized by default.

Signed-off-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent d3743fa9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1393,7 +1393,7 @@ int iwch_register_device(struct iwch_dev *dev)
	dev->ibdev.dev.parent = &dev->rdev.rnic_info.pdev->dev;
	dev->ibdev.uverbs_abi_ver = IWCH_UVERBS_ABI_VERSION;

	dev->ibdev.iwcm = kmalloc(sizeof(struct iw_cm_verbs), GFP_KERNEL);
	dev->ibdev.iwcm = kzalloc(sizeof(struct iw_cm_verbs), GFP_KERNEL);
	if (!dev->ibdev.iwcm)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ void c4iw_register_device(struct work_struct *work)
	dev->ibdev.dev.parent = &dev->rdev.lldi.pdev->dev;
	dev->ibdev.uverbs_abi_ver = C4IW_UVERBS_ABI_VERSION;

	dev->ibdev.iwcm = kmalloc(sizeof(struct iw_cm_verbs), GFP_KERNEL);
	dev->ibdev.iwcm = kzalloc(sizeof(struct iw_cm_verbs), GFP_KERNEL);
	if (!dev->ibdev.iwcm) {
		ret = -ENOMEM;
		goto err_dealloc_ctx;