hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/net/ethernet/qlogic/qed/qed_sriov.c
....@@ -4378,6 +4378,9 @@
43784378 }
43794379
43804380 vf = qed_iov_get_vf_info(QED_LEADING_HWFN(cdev), (u16)vfid, true);
4381
+ if (!vf)
4382
+ return -EINVAL;
4383
+
43814384 vport_id = vf->vport_id;
43824385
43834386 return qed_configure_vport_wfq(cdev, vport_id, rate);
....@@ -5123,7 +5126,7 @@
51235126
51245127 /* Validate that the VF has a configured vport */
51255128 vf = qed_iov_get_vf_info(hwfn, i, true);
5126
- if (!vf->vport_instance)
5129
+ if (!vf || !vf->vport_instance)
51275130 continue;
51285131
51295132 memset(&params, 0, sizeof(params));