|
@@ -667,9 +667,13 @@ qlcnic_set_ringparam(struct net_device *dev,
|
|
|
static int qlcnic_validate_ring_count(struct qlcnic_adapter *adapter,
|
|
|
u8 rx_ring, u8 tx_ring)
|
|
|
{
|
|
|
+ if (rx_ring == 0 || tx_ring == 0)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
if (rx_ring != 0) {
|
|
|
if (rx_ring > adapter->max_sds_rings) {
|
|
|
- netdev_err(adapter->netdev, "Invalid ring count, SDS ring count %d should not be greater than max %d driver sds rings.\n",
|
|
|
+ netdev_err(adapter->netdev,
|
|
|
+ "Invalid ring count, SDS ring count %d should not be greater than max %d driver sds rings.\n",
|
|
|
rx_ring, adapter->max_sds_rings);
|
|
|
return -EINVAL;
|
|
|
}
|