[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <abab6ad5-5c97-60d4-031a-64632c0e2b04@canonical.com>
Date: Sat, 16 May 2020 10:25:34 +0100
From: Colin Ian King <colin.king@...onical.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alan Stern <stern@...land.harvard.edu>
Cc: Zhang Shengju <zhangshengju@...s.chinamobile.com>,
Tang Bin <tangbin@...s.chinamobile.com>,
linux-usb@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparison
of an unsigned int
On 16/05/2020 07:30, Greg Kroah-Hartman wrote:
> On Fri, May 15, 2020 at 01:21:21PM -0400, Alan Stern wrote:
>> On Fri, May 15, 2020 at 05:54:53PM +0100, Colin King wrote:
>>> From: Colin Ian King <colin.king@...onical.com>
>>>
>>> The comparison of hcd->irq to less than zero for an error check will
>>> never be true because hcd->irq is an unsigned int. Fix this by
>>> assigning the int retval to the return of platform_get_irq and checking
>>> this for the -ve error condition and assigning hcd->irq to retval.
>>>
>>> Addresses-Coverity: ("Unsigned compared against 0")
>>> Fixes: c856b4b0fdb5 ("USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe()")
>>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>>> ---
>>
>> Thanks to Coverity for spotting this. Any reason why it didn't spot
>> exactly the same mistake in the ohci-da8xx.c driver?
>
> I think Coverity only runs on a limited kernel configuration and does
> not build everything :(
>
I do x86-64 make allmodconfig builds, so it does a fair amount of
coverage on the builds
Colin
Powered by blists - more mailing lists