From patchwork Wed Jan 11 16:32:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9510617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E49BE60762 for ; Wed, 11 Jan 2017 16:33:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C645D28563 for ; Wed, 11 Jan 2017 16:33:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB3522858F; Wed, 11 Jan 2017 16:33:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DFF72285EB for ; Wed, 11 Jan 2017 16:33:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cRLpz-0004jq-7b; Wed, 11 Jan 2017 16:33:23 +0000 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cRLpv-0004YT-J4 for linux-arm-kernel@lists.infradead.org; Wed, 11 Jan 2017 16:33:21 +0000 Received: by mail-pg0-x243.google.com with SMTP id 204so7374402pge.2 for ; Wed, 11 Jan 2017 08:32:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QvbGV9/Rh8i8zOK5dgYlHYnwkWYTssWFeNkCS/MwkC4=; b=sEssO8Dj7VnaE6jD7HnEfYXaughkxEQm5ZsApafXCOzSy4Ow+nkNYOGWUiulQnTLcf P3+mJ5bdBYh6wje1e0QYYmjmT0+JGUqID7O+77ptXym2FOYNnkZYNu08MXxyFgeEA/1N hSCTNaFAsyeruoVX8nIZSPCuVXrFxSQfA3lH+pJ28i4AH+TmWnoVh/Od8S770N+7Xm5h ORUHvq6Gn514t03joJgSkacnse+2cSR4WnfLghyRGKOrfyenpApzTgCV/EkJZesfeyTJ WT8EQ2cJYTldir3mS3VrMaHIjUUKIFBAco39k2R18/Wt7Gt/uP8I8rUuTzlpijbbsdqc bGXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QvbGV9/Rh8i8zOK5dgYlHYnwkWYTssWFeNkCS/MwkC4=; b=nAC71SllEp4R9kxGHv6skCE8IxZLKeGBk7DUylbWQBWqb5ne/25bYxYwgUs6c7l8ZK UDUpgPcraLeVMoLmxnsB3nMcxUb+CwGuTAOaTBgjBkekaXDoflNrwUvIbOw4dlYNBCrw HNBDIeki3q27/vG5vdDLKM5bAKIaOSg2sy5eQYQ58SxSoOQHdZ64V2Z7PRCMmxV/BaBi U4r7yqV6y1D9M26z+J9RCI4bIRm34AlEpBnNhkuzts5xMP2uE+RXUoLZSjqW/fA5Ci3W IVopesdF796a2SFOy6Tx6bEQsgEQWh2AslK+PRV+5sEpLXdtLSLWUVsYLA9zFAsFkhQm jjSw== X-Gm-Message-State: AIkVDXI5V403+/Xgg0StcthO66xUGXASvobpEtNG310n4vbkwMcjdP3GJnkZIy7pChg5ig== X-Received: by 10.84.236.76 with SMTP id h12mr14575340pln.173.1484152377994; Wed, 11 Jan 2017 08:32:57 -0800 (PST) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id m12sm15027004pfg.92.2017.01.11.08.32.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 08:32:57 -0800 (PST) From: Wei Yongjun To: Sunil Goutham , Robert Richter Subject: [PATCH net-next] net: thunderx: Fix error return code in nicvf_open() Date: Wed, 11 Jan 2017 16:32:51 +0000 Message-Id: <20170111163251.19367-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170111_083319_662296_71991B87 X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 712c31853440 ("net: thunderx: Program LMAC credits based on MTU") Signed-off-by: Wei Yongjun --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index 273eafd..a25bb6e 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -1274,7 +1274,8 @@ int nicvf_open(struct net_device *netdev) /* Configure receive side scaling and MTU */ if (!nic->sqs_mode) { nicvf_rss_init(nic); - if (nicvf_update_hw_max_frs(nic, netdev->mtu)) + err = nicvf_update_hw_max_frs(nic, netdev->mtu); + if (err) goto cleanup; /* Clear percpu stats */