There is no message when PHY is not enabled, IRQ line can't be acquired, or
debugfs registration fails. This patch adds the messages.

Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com>
---
 drivers/usb/chipidea/core.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index c57448a..ffd2457 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -659,8 +659,10 @@ static int ci_hdrc_probe(struct platform_device *pdev)
 
                /* if both generic PHY and USB PHY layers aren't enabled */
                if (PTR_ERR(ci->phy) == -ENOSYS &&
-                               PTR_ERR(ci->usb_phy) == -ENXIO)
+                               PTR_ERR(ci->usb_phy) == -ENXIO) {
+                       dev_err(dev, "PHY and USB PHY layers aren't enabled\n");
                        return -ENXIO;
+               }
 
                if (IS_ERR(ci->phy) && IS_ERR(ci->usb_phy))
                        return -EPROBE_DEFER;
@@ -761,16 +763,22 @@ static int ci_hdrc_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, ci);
        ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->platdata->name,
                          ci);
-       if (ret)
+       if (ret) {
+               dev_err(dev, "can't acquire IRQ line %d\n", ci->irq);
                goto stop;
+       }
 
        if (ci_otg_is_fsm_mode(ci))
                ci_hdrc_otg_fsm_start(ci);
 
        ret = dbg_create_files(ci);
-       if (!ret)
-               return 0;
+       if (ret) {
+               dev_err(dev, "can't register debugfs files\n");
+               goto release_irq;
+       }
+       return 0;
 
+release_irq:
        free_irq(ci->irq, ci);
 stop:
        ci_role_destroy(ci);
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to