qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] usb: deal with potential Null pointer retur


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/2] usb: deal with potential Null pointer returned by usb_ep_get()
Date: Thu, 31 Jan 2019 09:03:52 +0100
User-agent: NeoMutt/20180716

On Wed, Jan 30, 2019 at 02:37:02PM +0000, Liam Merwick wrote:
> From: Liam Merwick <address@hidden>
> 
> usb_ep_get() can return a Null pointer in the (albeit unlikely) case
> that a NULL USBDevice is passed in via the 'dev' parameter.

That should never ever happen.

> Reported by the Parfait static code analysis tool

Try add "assert(dev != NULL)" to usb_ep_get() instead of sprinkling
pointless checks all over the place.

thanks,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]