summaryrefslogtreecommitdiff
path: root/drivers/mfd/omap-usb-tll.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/omap-usb-tll.c')
-rw-r--r--drivers/mfd/omap-usb-tll.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c
index af67b96ded0f..3dbbfea515ad 100644
--- a/drivers/mfd/omap-usb-tll.c
+++ b/drivers/mfd/omap-usb-tll.c
@@ -225,6 +225,11 @@ static int usbtll_omap_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ if (!pdata) {
+ dev_err(dev, "Platform data missing\n");
+ return -ENODEV;
+ }
+
spin_lock_init(&tll->lock);
tll->pdata = pdata;
@@ -368,11 +373,6 @@ static int usbtll_runtime_resume(struct device *dev)
dev_dbg(dev, "usbtll_runtime_resume\n");
- if (!pdata) {
- dev_dbg(dev, "missing platform_data\n");
- return -ENODEV;
- }
-
spin_lock_irqsave(&tll->lock, flags);
for (i = 0; i < tll->nch; i++) {
@@ -404,11 +404,6 @@ static int usbtll_runtime_suspend(struct device *dev)
dev_dbg(dev, "usbtll_runtime_suspend\n");
- if (!pdata) {
- dev_dbg(dev, "missing platform_data\n");
- return -ENODEV;
- }
-
spin_lock_irqsave(&tll->lock, flags);
for (i = 0; i < tll->nch; i++) {