diff options
Diffstat (limited to 'drivers/net/cxgb3/mc5.c')
-rw-r--r-- | drivers/net/cxgb3/mc5.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/cxgb3/mc5.c b/drivers/net/cxgb3/mc5.c index 644d62ea86a6..84c1ffa8e2d3 100644 --- a/drivers/net/cxgb3/mc5.c +++ b/drivers/net/cxgb3/mc5.c | |||
@@ -328,6 +328,9 @@ int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters, | |||
328 | unsigned int tcam_size = mc5->tcam_size; | 328 | unsigned int tcam_size = mc5->tcam_size; |
329 | struct adapter *adap = mc5->adapter; | 329 | struct adapter *adap = mc5->adapter; |
330 | 330 | ||
331 | if (!tcam_size) | ||
332 | return 0; | ||
333 | |||
331 | if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size) | 334 | if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size) |
332 | return -EINVAL; | 335 | return -EINVAL; |
333 | 336 | ||