* [PATCH v2] USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
@ 2020-05-13 13:26 Tang Bin
2020-05-14 2:51 ` Peter Chen
0 siblings, 1 reply; 2+ messages in thread
From: Tang Bin @ 2020-05-13 13:26 UTC (permalink / raw)
To: gregkh, stern; +Cc: linux-usb, linux-kernel, Tang Bin, Zhang Shengju
The function ehci_mxc_drv_probe() does not perform sufficient error
checking after executing platform_get_irq(), thus fix it.
Fixes: 7e8d5cd93fa ("USB: Add EHCI support for MX27 and MX31 based boards")
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
Changes from v1
- fix the subject.
---
drivers/usb/host/ehci-mxc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index c9f91e6c7..7f65c8604 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -50,6 +50,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
}
irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
hcd = usb_create_hcd(&ehci_mxc_hc_driver, dev, dev_name(dev));
if (!hcd)
--
2.20.1.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
2020-05-13 13:26 [PATCH v2] USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe() Tang Bin
@ 2020-05-14 2:51 ` Peter Chen
0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2020-05-14 2:51 UTC (permalink / raw)
To: Tang Bin; +Cc: gregkh, stern, linux-usb, linux-kernel, Zhang Shengju
On 20-05-13 21:26:47, Tang Bin wrote:
> The function ehci_mxc_drv_probe() does not perform sufficient error
> checking after executing platform_get_irq(), thus fix it.
>
> Fixes: 7e8d5cd93fa ("USB: Add EHCI support for MX27 and MX31 based boards")
> Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
> ---
> Changes from v1
> - fix the subject.
> ---
> drivers/usb/host/ehci-mxc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
> index c9f91e6c7..7f65c8604 100644
> --- a/drivers/usb/host/ehci-mxc.c
> +++ b/drivers/usb/host/ehci-mxc.c
> @@ -50,6 +50,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
> }
>
> irq = platform_get_irq(pdev, 0);
> + if (irq < 0)
> + return irq;
>
> hcd = usb_create_hcd(&ehci_mxc_hc_driver, dev, dev_name(dev));
> if (!hcd)
> --
Reviewed-by: Peter Chen <peter.chen@nxp.com>
--
Thanks,
Peter Chen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-14 2:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 13:26 [PATCH v2] USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe() Tang Bin
2020-05-14 2:51 ` Peter Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).