aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorJon Hunter <[email protected]>2023-04-05 19:18:53 +0100
committerGreg Kroah-Hartman <[email protected]>2023-04-20 10:02:55 +0200
commit5629d31955297ca47b9283c64fff70f2f34aa528 (patch)
treeba5cfa0fa4c40f64a243df65bab5bc3af54ed7cb /drivers/fpga/fpga-mgr.c
parent9e6ca3e6ff4a463454d35c8747aa08198628f4d7 (diff)
usb: gadget: tegra-xudc: Fix crash in vbus_draw
Commit ac82b56bda5f ("usb: gadget: tegra-xudc: Add vbus_draw support") populated the vbus_draw callback for the Tegra XUDC driver. The function tegra_xudc_gadget_vbus_draw(), that was added by this commit, assumes that the pointer 'curr_usbphy' has been initialised, which is not always the case because this is only initialised when the USB role is updated. Fix this crash, by checking that the 'curr_usbphy' is valid before dereferencing. Fixes: ac82b56bda5f ("usb: gadget: tegra-xudc: Add vbus_draw support") Reviewed-by: Thierry Reding <[email protected]> Signed-off-by: Jon Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions