On Wed, Oct 12, 2016 at 05:24:31AM +0000, fx IWATA NOBUO wrote:
> Hello,
> I will send a patch to clear this warning.
> The current behavior is as following:
> vdev_to_vhci() is inline of container_of().
> A pointer (struct vhci_hcd *vhci) may be container_of() from NULL for a
> while.
> If it is container_of() from NULL, it will not be referenced because of
>  NULL check of source pointer of the container_of().

Are you looking at linux-next?  vdev_to_vhci() derefernces "vdev" to get
vdev->rhport so this is a bug and not a false positive.

Smatch sometimes does have false positives because it thinks foo->array
is a dereference when really we're taking the address of the array.  I
should fix that...  But it understands that container_of(NULL) is ok.

dan carpenter

To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to