Re: [PATCH] xhci: Fix bcdUSB initialization

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

 



On Fri, Feb 28, 2025 at 01:04:00AM +0530, Abhishek Tamboli wrote:
> Initialize bcdUSB to 0 to prevent undefined behaviour
> if accessed without being explicitly set.
> 
> Fix the following smatch error:
> drivers/usb/host/xhci-hub.c:71 xhci_create_usb3x_bos_desc()
> error: uninitialized symbol 'bcdUSB'
> 
> Signed-off-by: Abhishek Tamboli <abhishektamboli9@xxxxxxxxx>
> ---

The concern here would be that xhci->num_port_caps is <= 0.  That's
probably not possible so it's likely a false positive.

regards,
dan carpenter




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

  Powered by Linux