diff options
author | Hariprasad Shenai <hariprasad@chelsio.com> | 2016-03-08 08:20:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-11 00:12:25 +0300 |
commit | 28f71c6df4c5399e4f30ce37c1fff0f6af3d364d (patch) | |
tree | 287a1f9529eda0aa4acdf4b411338f51f5d248aa /drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | |
parent | 495c22bbb2b03548f6aa870faa7f6b601cb41c85 (diff) | |
download | linux-28f71c6df4c5399e4f30ce37c1fff0f6af3d364d.tar.xz |
cxgb4vf: Add a couple more checks for invalid provisioning configurations
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c index 17a31531b26e..5a3b8836847d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c @@ -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"); |