From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Sun, 20 Dec 2015 11:05:55 -0800 Subject: [ath9k-devel] [patch -next] ath9k: fix ath9k_hw_nvram_check_version() In-Reply-To: References: <20151219105919.GB3749@mwanda> <1450637228.3430.30.camel@perches.com> Message-ID: <1450638355.3430.34.camel@perches.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Sun, 2015-12-20 at 20:00 +0100, Julia Lawall wrote: > On Sun, 20 Dec 2015, Joe Perches wrote: > > > On Sat, 2015-12-19 at 13:59 +0300, Dan Carpenter wrote: > > > There is a type bug so it always returns success. > >? > > How many false positives do you have to sift > > through to find this sort of error? > > The return type is thoughtfully bool, so it should be easy in this case.?? > The function has a return -EINVAL and a return true, so even without the? > return type it would be locally apparent that there is an inconsistency. True, -EINVAL is a non-bool constant, but bool returns can be a variable int. Dan, was the check any constant non-bool?