Re: [PATCH] usb: usb-acpi: fix uninitialized variable in usb_acpi_get_connect_type()

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

 



On Fri, Mar 15, 2024 at 05:36:16PM +0200, Mathias Nyman wrote:
> On 15.3.2024 17.21, Dan Carpenter wrote:
> > The "pld" pointer is uninitialized if acpi_get_physical_device_location()
> > fails.  Initialize it to NULL.
> > 
> > Fixes: f3ac348e6e04 ("usb: usb-acpi: Set port connect type of not connectable ports correctly")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > ---
> 
> I sent a similar patch a week ago, just before merge window opened.
> looks like it didn't make it.
> 
> https://lore.kernel.org/linux-usb/20240308113425.1144689-1-mathias.nyman@xxxxxxxxxxxxxxx/

Huh.  That's interesting that this bug was causing issues in real life.
I thought everyone was using the GCC extension to zero stack variables.
I've only been fixing uninitialized variable bugs out of sense of
stubbornness and to boost my patch count.  :P

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