Message ID | 20190615100009.14654-2-chunkeey@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 12e66ffbd534b1b622e7b907511a39cf572a32e3 |
Delegated to: | Kalle Valo |
Headers | show |
Series | p54: remove dead branch in op_conf_tx callback | expand |
Christian Lamparter <chunkeey@gmail.com> wrote: > This patch removes the error branch for (queue > dev->queues). > It is no longer needed anymore as the "queue" value is validated by > cfg80211's parse_txq_params() before the driver code gets called. > > Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Patch applied to wireless-drivers-next.git, thanks. 12e66ffbd534 p54: remove dead branch in op_conf_tx callback
diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c index 1c6d428515a4..4cc0ece0cd0e 100644 --- a/drivers/net/wireless/intersil/p54/main.c +++ b/drivers/net/wireless/intersil/p54/main.c @@ -414,12 +414,9 @@ static int p54_conf_tx(struct ieee80211_hw *dev, int ret; mutex_lock(&priv->conf_mutex); - if (queue < dev->queues) { - P54_SET_QUEUE(priv->qos_params[queue], params->aifs, - params->cw_min, params->cw_max, params->txop); - ret = p54_set_edcf(priv); - } else - ret = -EINVAL; + P54_SET_QUEUE(priv->qos_params[queue], params->aifs, + params->cw_min, params->cw_max, params->txop); + ret = p54_set_edcf(priv); mutex_unlock(&priv->conf_mutex); return ret; }
This patch removes the error branch for (queue > dev->queues). It is no longer needed anymore as the "queue" value is validated by cfg80211's parse_txq_params() before the driver code gets called. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> --- drivers/net/wireless/intersil/p54/main.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)