usb: omap2430: fix memleak in err case
PATCH 1/1 usb: omap2430: fix memleak in err case
when omap_get_control_dev fail, we should release relational platform_device
--- drivers/usb/musb/omap2430.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/usb/musb/omap2430.c +2 -1
@@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev) glue->control_otghs =omap_get_control_dev ();if (IS_ERR (glue->control_otghs)) {dev_vdbg (&pdev->dev,"Failed to get control device\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto err2; } }else { glue->control_otghs =ERR_PTR (-ENODEV );
Signature · 1 line
1.7.1
Hello.
Quoted 1 line · Libo Chen
when
omap_get_control_devfail, we should release relationalplatform_device
s/fail/fails/, s/relational/related/?
Quoted 1 line
Signed-off-by Libo Chen <[email protected]>
You've posted this to the wrong mailing list, linux-mips;
devicetree-discuss also seems hardly related.
WBR, Sergei
Quoted 6 lines · Sergei Shtylyov
Hello.
Quoted 1 line · Libo Chen
when
omap_get_control_devfail, we should release relationalplatform_device
Quoted 10 lines
s/fail/fails/, s/relational/related/?
Quoted 1 line
Signed-off-by Libo Chen <[email protected]>You've posted this to the wrong mailing list, linux-mips; devicetree-discuss also seems hardly related.
WBR, Sergei
Hi Sergei,
Thank you for your remind.
PATCH v2 1/1 usb: omap2430: fix memleak in err case
In reply to Libo Chenwhen omap_get_control_dev faild, we should release related platform_device
* Changelog from v1:
* fix spell: s/fail/fails/, s/relational/related/ , thank Sergei <[email protected]>
--- drivers/usb/musb/omap2430.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/usb/musb/omap2430.c +2 -1
@@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev) glue->control_otghs =omap_get_control_dev ();if (IS_ERR (glue->control_otghs)) {dev_vdbg (&pdev->dev,"Failed to get control device\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto err2; } }else { glue->control_otghs =ERR_PTR (-ENODEV );
Signature · 1 line
1.7.1
ping...
Quoted 26 lines · Libo Chen
when
omap_get_control_devfaild, we should release relatedplatform_device* Changelog from v1:
* fix spell: s/fail/fails/, s/relational/related/ , thank Sergei <[email protected]>Signed-off-by Libo Chen <[email protected]>--- drivers/usb/musb/omap2430.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/usb/musb/omap2430.c +2
-1@@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev) glue->control_otghs =omap_get_control_dev ();if (IS_ERR (glue->control_otghs)) {dev_vdbg (&pdev->dev,"Failed to get control device\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto err2; } }else { glue->control_otghs =ERR_PTR (-ENODEV );
No go.
Check the 4b7e450fb5cefb5865c77999a675330206ab3b8a And update you tree, please.
--
With Best Regards,
Andy Shevchenko
Quoted 10 lines · Andy Shevchenko
No go.
Check the
4b7e450fb5cefb5865c77999a675330206ab3b8aAnd update you tree, please.--
With Best Regards,
Andy Shevchenko
It had been changed :(
Thanks,
Libo
Hello.
Quoted 4 lines · Libo Chen
when
omap_get_control_devfaild, we should release relatedplatform_device* Changelog from v1:
* fix spell: s/fail/fails/, s/relational/related/ , thank Sergei <[email protected]>
It seems you've actually replaced "fail" with "faild", not "fails".
Quoted 4 lines
Signed-off-by Libo Chen <[email protected]>--- drivers/usb/musb/omap2430.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
WBR, Sergei
Quoted 10 lines · Sergei Shtylyov
Hello.
Quoted 4 lines · Libo Chen
when
omap_get_control_devfaild, we should release relatedplatform_device* Changelog from v1:
* fix spell: s/fail/fails/, s/relational/related/ , thank Sergei <[email protected]>It seems you've actually replaced "fail" with "faild", not "fails".
sorry for my weak spell.
thanks again,
Libo
Quoted 10 lines
Quoted 5 lines
Signed-off-by Libo Chen <[email protected]>--- drivers/usb/musb/omap2430.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)WBR, Sergei