aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/host/ohci-at91.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 414e3c376dbb..5302f988e7e6 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -350,7 +350,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
350 350
351 case USB_PORT_FEAT_SUSPEND: 351 case USB_PORT_FEAT_SUSPEND:
352 dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n"); 352 dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n");
353 if (valid_port(wIndex)) { 353 if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
354 ohci_at91_port_suspend(ohci_at91->sfr_regmap, 354 ohci_at91_port_suspend(ohci_at91->sfr_regmap,
355 1); 355 1);
356 return 0; 356 return 0;
@@ -393,7 +393,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
393 393
394 case USB_PORT_FEAT_SUSPEND: 394 case USB_PORT_FEAT_SUSPEND:
395 dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n"); 395 dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n");
396 if (valid_port(wIndex)) { 396 if (valid_port(wIndex) && ohci_at91->sfr_regmap) {
397 ohci_at91_port_suspend(ohci_at91->sfr_regmap, 397 ohci_at91_port_suspend(ohci_at91->sfr_regmap,
398 0); 398 0);
399 return 0; 399 return 0;