Skip to content

Commit 28f71c6

Browse files
Hariprasad Shenaidavem330
authored andcommitted
cxgb4vf: Add a couple more checks for invalid provisioning configurations
Signed-off-by: Hariprasad Shenai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 495c22b commit 28f71c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2361,6 +2361,11 @@ static int adap_init0(struct adapter *adapter)
23612361
}
23622362

23632363
/* Check for various parameter sanity issues */
2364+
if (adapter->params.vfres.pmask == 0) {
2365+
dev_err(adapter->pdev_dev, "no port access configured\n"
2366+
"usable!\n");
2367+
return -EINVAL;
2368+
}
23642369
if (adapter->params.vfres.nvi == 0) {
23652370
dev_err(adapter->pdev_dev, "no virtual interfaces configured/"
23662371
"usable!\n");

0 commit comments

Comments
 (0)