summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/fhci-hcd.c
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2010-01-07 02:17:32 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-01-21 00:24:35 +0100
commitae35fe9e8abe828b25053cd3efdc6953fbb710e3 (patch)
treedf06177ef93f656171606a2caa485138abba06a1 /drivers/usb/host/fhci-hcd.c
parentUSB: Fix duplicate sysfs problem after device reset. (diff)
downloadlinux-ae35fe9e8abe828b25053cd3efdc6953fbb710e3.tar.xz
linux-ae35fe9e8abe828b25053cd3efdc6953fbb710e3.zip
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>
Diffstat (limited to 'drivers/usb/host/fhci-hcd.c')
-rw-r--r--drivers/usb/host/fhci-hcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 0951818ef93b..78e7c3cfcb72 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -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);