summaryrefslogtreecommitdiffstats
path: root/drivers/usb/fotg210
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2023-01-20 16:44:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-24 18:12:58 +0100
commit6a426eb418791975c39680b7abd5f26dc2c4f66e (patch)
tree597a2e0863dfc6a17f9f404b4a28724524ca2b80 /drivers/usb/fotg210
parentusb: fotg210-hcd: Don't shadow error codes in store() (diff)
downloadlinux-6a426eb418791975c39680b7abd5f26dc2c4f66e.tar.xz
linux-6a426eb418791975c39680b7abd5f26dc2c4f66e.zip
usb: fotg210-udc: remove redundant error logging
A call to platform_get_irq() already prints an error on failure within its own implementation. So printing another error based on its return value in the caller is redundant and should be removed. The clean up also makes if condition block braces unnecessary. Remove that as well. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230120154437.22025-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/fotg210')
-rw-r--r--drivers/usb/fotg210/fotg210-udc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/fotg210/fotg210-udc.c b/drivers/usb/fotg210/fotg210-udc.c
index ae29787de0fd..21f31123cd61 100644
--- a/drivers/usb/fotg210/fotg210-udc.c
+++ b/drivers/usb/fotg210/fotg210-udc.c
@@ -1180,10 +1180,8 @@ int fotg210_udc_probe(struct platform_device *pdev, struct fotg210 *fotg)
int i;
irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- pr_err("could not get irq\n");
- return -ENODEV;
- }
+ if (irq < 0)
+ return irq;
/* initialize udc */
fotg210 = kzalloc(sizeof(struct fotg210_udc), GFP_KERNEL);