From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756088AbdEKSSP (ORCPT ); Thu, 11 May 2017 14:18:15 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50935 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755611AbdEKSSN (ORCPT ); Thu, 11 May 2017 14:18:13 -0400 Subject: Re: [PATCH] ethernet: aquantia: remove redundant checks on error status To: David Miller References: <20170511172929.12951-1-colin.king@canonical.com> <20170511.141623.1200573443845531222.davem@davemloft.net> Cc: pavel.belous@aquantia.com, Dmitrii.Tarakanov@aquantia.com, Alexander.Loktionov@aquantia.com, vomlehn@texas.net, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org From: Colin Ian King Message-ID: <174d4afe-16a8-cd2d-9be9-0f502cc89a59@canonical.com> Date: Thu, 11 May 2017 19:18:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170511.141623.1200573443845531222.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/05/17 19:16, David Miller wrote: > From: Colin King > Date: Thu, 11 May 2017 18:29:29 +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. Since these 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 > > Please enhance your commit message to also explain that the functions > being called around these checks all return void, to make it clear > that this isn't an issue of the return values not being checked. > > Thanks. > Good idea. Will do.