aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2016-03-08 10:50:19 +0530
committerDavid S. Miller <davem@davemloft.net>2016-03-10 16:12:25 -0500
commit28f71c6df4c5399e4f30ce37c1fff0f6af3d364d (patch)
tree287a1f9529eda0aa4acdf4b411338f51f5d248aa /drivers
parentcxgb4vf: Configure queue based on resource and interrupt type (diff)
downloadlinux-dev-28f71c6df4c5399e4f30ce37c1fff0f6af3d364d.tar.xz
linux-dev-28f71c6df4c5399e4f30ce37c1fff0f6af3d364d.zip
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')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c5
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");