From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932765AbdELBmh (ORCPT ); Thu, 11 May 2017 21:42:37 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:56844 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754397AbdELBmg (ORCPT ); Thu, 11 May 2017 21:42:36 -0400 Date: Thu, 11 May 2017 21:42:33 -0400 (EDT) Message-Id: <20170511.214233.1981021610793266657.davem@davemloft.net> To: colin.king@canonical.com Cc: pavel.belous@aquantia.com, vomlehn@texas.net, Alexander.Loktionov@aquantia.com, Dmitry.Bezrukov@aquantia.com, Dmitrii.Tarakanov@aquantia.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][V2] ethernet: aquantia: remove redundant checks on error status From: David Miller In-Reply-To: <20170511182940.18774-1-colin.king@canonical.com> References: <20170511182940.18774-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 11 May 2017 18:01:06 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin King Date: Thu, 11 May 2017 19:29:40 +0100 > From: Colin Ian King > > The error status err is initialized as zero and then being checked > several times to see if it is less than zero even when it has not > been updated. It may seem that the err should be assigned to the > return code of the call to the various *offload_en_set calls and > then we check for failure, however, these functions are void and > never actually return any status. > > Since these error checks are redundant we can remove these > as well as err and the error exit label err_exit. > > Detected by CoverityScan, CID#1398313 and CID#1398306 ("Logically > dead code") > > Signed-off-by: Colin Ian King Applied, thank you.