summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-omap.c')
-rw-r--r--drivers/usb/host/ohci-omap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 92a77dfd193..c7b06f504c6 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -18,6 +18,7 @@
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
+#include <linux/err.h>
#include <linux/gpio.h>
#include <mach/hardware.h>
@@ -212,7 +213,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
#ifdef CONFIG_USB_OTG
if (need_transceiver) {
ohci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2);
- if (ohci->transceiver) {
+ if (!IS_ERR_OR_NULL(ohci->transceiver)) {
int status = otg_set_host(ohci->transceiver->otg,
&ohci_to_hcd(ohci)->self);
dev_dbg(hcd->self.controller, "init %s transceiver, status %d\n",
@@ -403,7 +404,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
usb_remove_hcd(hcd);
- if (ohci->transceiver) {
+ if (!IS_ERR_OR_NULL(ohci->transceiver)) {
(void) otg_set_host(ohci->transceiver->otg, 0);
usb_put_phy(ohci->transceiver);
}