usb: dwc3: core: Fix tx/rx threshold settings
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Tue, 12 Apr 2022 01:33:47 +0000 (18:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:14:29 +0000 (09:14 +0200)
commit5d8299ead7c56053ffceecb350f119a27973bf51
treea8300bc2c51c3d5145e65c213051865533f1a2ca
parentb81be940eacaae355ea9ee03400ae3033062502e
usb: dwc3: core: Fix tx/rx threshold settings

commit f28ad9069363dec7deb88032b70612755eed9ee6 upstream.

The current driver logic checks against 0 to determine whether the
periodic tx/rx threshold settings are set, but we may get bogus values
from uninitialized variables if no device property is set. Properly
default these variables to 0.

Fixes: 938a5ad1d305 ("usb: dwc3: Check for ESS TX/RX threshold config")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/cccfce990b11b730b0dae42f9d217dc6fb988c90.1649727139.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c