提交 28f71c6d 编写于 作者: H Hariprasad Shenai 提交者: David S. Miller

cxgb4vf: Add a couple more checks for invalid provisioning configurations

Signed-off-by: NHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 495c22bb
......@@ -2361,6 +2361,11 @@ static int adap_init0(struct adapter *adapter)
}
/* Check for various parameter sanity issues */
if (adapter->params.vfres.pmask == 0) {
dev_err(adapter->pdev_dev, "no port access configured\n"
"usable!\n");
return -EINVAL;
}
if (adapter->params.vfres.nvi == 0) {
dev_err(adapter->pdev_dev, "no virtual interfaces configured/"
"usable!\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册