From: Colin Ian King <colin.king@canonical.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alan Stern <stern@rowland.harvard.edu>
Cc: Zhang Shengju <zhangshengju@cmss.chinamobile.com>,
Tang Bin <tangbin@cmss.chinamobile.com>,
linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int
Date: Sat, 16 May 2020 10:25:34 +0100 [thread overview]
Message-ID: <abab6ad5-5c97-60d4-031a-64632c0e2b04@canonical.com> (raw)
In-Reply-To: <20200516063045.GA3846431@kroah.com>
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@canonical.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@canonical.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
prev parent reply other threads:[~2020-05-16 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 16:54 Colin King
2020-05-15 17:21 ` Alan Stern
2020-05-15 17:26 ` Colin Ian King
2020-05-15 18:43 ` Alan Stern
2020-05-15 23:23 ` [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparisonof " Tang Bin
2020-05-16 1:17 ` Alan Stern
2020-05-16 6:30 ` [PATCH][next] USB: EHCI: ehci-mv: fix less than zero comparison of " Greg Kroah-Hartman
2020-05-16 9:25 ` Colin Ian King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abab6ad5-5c97-60d4-031a-64632c0e2b04@canonical.com \
--to=colin.king@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=tangbin@cmss.chinamobile.com \
--cc=zhangshengju@cmss.chinamobile.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®