usb: cdnsp: Fix segmentation fault in cdns_lost_power function
authorPawel Laszczak <pawell@cadence.com>
Tue, 11 Jan 2022 09:07:37 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jan 2022 13:11:16 +0000 (14:11 +0100)
commit79aa3e19fe8f5be30e846df8a436bfe306e8b1a6
tree2a70e7dff6af5a4424eb109223ecbd9fc4199fb3
parentac55d163855924aa5af9f1560977da8f346963c8
usb: cdnsp: Fix segmentation fault in cdns_lost_power function

CDNSP driver read not initialized cdns->otg_v0_regs
which lead to segmentation fault. Patch fixes this issue.

Fixes: 2cf2581cd229 ("usb: cdns3: add power lost support for system resume")
cc: <stable@vger.kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20220111090737.10345-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/drd.c