mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 18:08:20 +00:00
USB: FHCI: avoid NULL pointer dereference
Assign fhci only if usb is not NULL. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
04a723ea9c
commit
ae35fe9e8a
@ -242,9 +242,10 @@ err:
|
||||
static void fhci_usb_free(void *lld)
|
||||
{
|
||||
struct fhci_usb *usb = lld;
|
||||
struct fhci_hcd *fhci = usb->fhci;
|
||||
struct fhci_hcd *fhci;
|
||||
|
||||
if (usb) {
|
||||
fhci = usb->fhci;
|
||||
fhci_config_transceiver(fhci, FHCI_PORT_POWER_OFF);
|
||||
fhci_ep0_free(usb);
|
||||
kfree(usb->actual_frame);
|
||||
|
Loading…
x
Reference in New Issue
Block a user