diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-01-20 17:44:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-24 18:12:58 +0100 |
commit | 6df3d3aadb6474b9cda105576d042d5d31adec0c (patch) | |
tree | a50fc8c8abde012fbf294a8d47b42370cfaa8cc3 /drivers/usb/fotg210/fotg210-hcd.c | |
parent | 6a426eb418791975c39680b7abd5f26dc2c4f66e (diff) |
usb: fotg210: Switch to use dev_err_probe()
Switch to use dev_err_probe() to simplify the error paths and
unify message template.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230120154437.22025-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/fotg210/fotg210-hcd.c')
-rw-r--r-- | drivers/usb/fotg210/fotg210-hcd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/fotg210/fotg210-hcd.c b/drivers/usb/fotg210/fotg210-hcd.c index 5a934f5343a7..613d29f04bcb 100644 --- a/drivers/usb/fotg210/fotg210-hcd.c +++ b/drivers/usb/fotg210/fotg210-hcd.c @@ -5575,8 +5575,7 @@ int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg) hcd = usb_create_hcd(&fotg210_fotg210_hc_driver, dev, dev_name(dev)); if (!hcd) { - dev_err(dev, "failed to create hcd\n"); - retval = -ENOMEM; + retval = dev_err_probe(dev, -ENOMEM, "failed to create hcd\n"); goto fail_create_hcd; } @@ -5600,7 +5599,7 @@ int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg) retval = usb_add_hcd(hcd, irq, IRQF_SHARED); if (retval) { - dev_err(dev, "failed to add hcd with err %d\n", retval); + dev_err_probe(dev, retval, "failed to add hcd\n"); goto failed_put_hcd; } device_wakeup_enable(hcd->self.controller); @@ -5611,8 +5610,7 @@ int fotg210_hcd_probe(struct platform_device *pdev, struct fotg210 *fotg) failed_put_hcd: usb_put_hcd(hcd); fail_create_hcd: - dev_err(dev, "init %s fail, %d\n", dev_name(dev), retval); - return retval; + return dev_err_probe(dev, retval, "init %s fail\n", dev_name(dev)); } /* |