diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-05-06 22:39:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-22 10:40:32 +0200 |
commit | e9035d8016762db5f7fece58d3895f165e64e1ed (patch) | |
tree | 7bcbcfb986fae8eeb0f94a7ae9950860b8b43dea /drivers | |
parent | 2b205f919bb4c0fadd9df12ad743f7d3b59fd72d (diff) | |
download | linux-stable-e9035d8016762db5f7fece58d3895f165e64e1ed.tar.gz linux-stable-e9035d8016762db5f7fece58d3895f165e64e1ed.tar.bz2 linux-stable-e9035d8016762db5f7fece58d3895f165e64e1ed.zip |
usb: fotg210-hcd: Fix an error message
[ Upstream commit a60a34366e0d09ca002c966dd7c43a68c28b1f82 ]
'retval' is known to be -ENODEV here.
This is a hard-coded default error code which is not useful in the error
message. Moreover, another error message is printed at the end of the
error handling path. The corresponding error code (-ENOMEM) is more
informative.
So remove simplify the first error message.
While at it, also remove the useless initialization of 'retval'.
Fixes: 7d50195f6c50 ("usb: host: Faraday fotg210-hcd driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/94531bcff98e46d4f9c20183a90b7f47f699126c.1620333419.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/fotg210-hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c index 72853020a542..15249e664b89 100644 --- a/drivers/usb/host/fotg210-hcd.c +++ b/drivers/usb/host/fotg210-hcd.c @@ -5599,7 +5599,7 @@ static int fotg210_hcd_probe(struct platform_device *pdev) struct usb_hcd *hcd; struct resource *res; int irq; - int retval = -ENODEV; + int retval; struct fotg210_hcd *fotg210; if (usb_disabled()) @@ -5619,7 +5619,7 @@ static int fotg210_hcd_probe(struct platform_device *pdev) hcd = usb_create_hcd(&fotg210_fotg210_hc_driver, dev, dev_name(dev)); if (!hcd) { - dev_err(dev, "failed to create hcd with err %d\n", retval); + dev_err(dev, "failed to create hcd\n"); retval = -ENOMEM; goto fail_create_hcd; } |