public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] usb: phy: msm: tiny leak on error in probe()
@ 2014-01-21  6:50 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-01-21  6:50 UTC (permalink / raw)
  To: kernel-janitors

Free "motog" on error.  This is more to appease the static checkers than
a real worry.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 8546c8dccd51..64c9d14ea77d 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1429,7 +1429,8 @@ static int __init msm_otg_probe(struct platform_device *pdev)
 	motg->phy.otg = kzalloc(sizeof(struct usb_otg), GFP_KERNEL);
 	if (!motg->phy.otg) {
 		dev_err(&pdev->dev, "unable to allocate msm_otg\n");
-		return -ENOMEM;
+		ret = -ENOMEM;
+		goto free_motg;
 	}
 
 	motg->pdata = dev_get_platdata(&pdev->dev);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-21  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21  6:50 [patch] usb: phy: msm: tiny leak on error in probe() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox