From 5ccf10b9c6640439f30868bdb4b84149bbd1cb64 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 16 May 2021 23:14:59 -0400 Subject: [PATCH] Fixes for 4.4 Signed-off-by: Sasha Levin --- queue-4.4/series | 1 + ...usb-fotg210-hcd-fix-an-error-message.patch | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 queue-4.4/usb-fotg210-hcd-fix-an-error-message.patch diff --git a/queue-4.4/series b/queue-4.4/series index 7ce7944f80b..fc4208a3590 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -162,3 +162,4 @@ kernel-kexec_file-fix-error-return-code-of-kexec_cal.patch arc-entry-fix-off-by-one-error-in-syscall-number-validation.patch powerpc-64s-fix-crashes-when-toggling-entry-flush-barrier.patch squashfs-fix-divide-error-in-calculate_skip.patch +usb-fotg210-hcd-fix-an-error-message.patch diff --git a/queue-4.4/usb-fotg210-hcd-fix-an-error-message.patch b/queue-4.4/usb-fotg210-hcd-fix-an-error-message.patch new file mode 100644 index 00000000000..1f787556748 --- /dev/null +++ b/queue-4.4/usb-fotg210-hcd-fix-an-error-message.patch @@ -0,0 +1,53 @@ +From 56b623c79d512b8942518bc382e8237672d87e8d Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 6 May 2021 22:39:10 +0200 +Subject: usb: fotg210-hcd: Fix an error message + +From: Christophe JAILLET + +[ 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 +Link: https://lore.kernel.org/r/94531bcff98e46d4f9c20183a90b7f47f699126c.1620333419.git.christophe.jaillet@wanadoo.fr +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/usb/host/fotg210-hcd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c +index 11b3a8c57eab..5dacc3076efd 100644 +--- a/drivers/usb/host/fotg210-hcd.c ++++ b/drivers/usb/host/fotg210-hcd.c +@@ -5610,7 +5610,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()) +@@ -5630,7 +5630,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; + } +-- +2.30.2 + -- 2.47.3