From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tariq Toukan Subject: [PATCH net-next] net: remove redundant input checks in SIOCSIFTXQLEN case of dev_ifsioc Date: Thu, 19 Jul 2018 17:50:32 +0300 Message-ID: <1532011832-6952-1-git-send-email-tariqt@mellanox.com> Cc: netdev@vger.kernel.org, Eran Ben Elisha , Tariq Toukan , Cong Wang To: "David S. Miller" Return-path: Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:35405 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731666AbeGSPeN (ORCPT ); Thu, 19 Jul 2018 11:34:13 -0400 Sender: netdev-owner@vger.kernel.org List-ID: The cited patch added a call to dev_change_tx_queue_len in SIOCSIFTXQLEN case. This obsoletes the checks done before the function call. Remove them here. Fixes: 3f76df198288 ("net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN") Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Cc: Cong Wang --- net/core/dev_ioctl.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c index 50537ff961a7..7c1ad40322a3 100644 --- a/net/core/dev_ioctl.c +++ b/net/core/dev_ioctl.c @@ -282,14 +282,7 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd) return dev_mc_del_global(dev, ifr->ifr_hwaddr.sa_data); case SIOCSIFTXQLEN: - if (ifr->ifr_qlen < 0) - return -EINVAL; - if (dev->tx_queue_len ^ ifr->ifr_qlen) { - err = dev_change_tx_queue_len(dev, ifr->ifr_qlen); - if (err) - return err; - } - return 0; + return dev_change_tx_queue_len(dev, ifr->ifr_qlen); case SIOCSIFNAME: ifr->ifr_newname[IFNAMSIZ-1] = '\0'; -- 1.8.3.1