Re: [PATCH] xhci: Fix bcdUSB initialization
From: Abhishek Tamboli
Date: Thu Feb 27 2025 - 15:11:37 EST
Hi Greg,
Thanks for the review.
> 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.
>
> Is it actually accessed without being set? If so, please explain it and
> also how the compiler is somehow missing this already?
I added bcdUSB = 0 based on a Smatch warning about potential uninitialized access.
However, given that bcdUSB is always set in the first loop iteration,
this might be a false positive.
Regards,
Abhishek