Re: [smatch stuff] re: USB: Free bandwidth when usb_disable_device is called.

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

 



On Tue, 28 Jun 2011, Dan Carpenter wrote:

> Hi Sarah,
> 
> Smatch complains that fccf4e86200b "USB: Free bandwidth when
> usb_disable_device is called." introduces a dereference before a
> check.
> 
> drivers/usb/core/hub.c +1639 usb_disconnect(6)
> 	warn: variable dereferenced before check 'udev'
> 
>   1633  void usb_disconnect(struct usb_device **pdev)
>   1634  {
>   1635          struct usb_device       *udev = *pdev;
>   1636          int                     i;
>   1637          struct usb_hcd          *hcd = bus_to_hcd(udev->bus);
>                                                           ^^^^^^^^^
> 	dereference.
> 
>   1638  
>   1639          if (!udev) {
>                     ^^^^^
> 	check.
> 
> I don't know the code well enough to say whether it's the
> dereference or the check which should be changed.

The check is unnecessary and can be removed.

Alan Stern

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux