diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-01-21 07:50:51 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-07 23:41:05 +0100 |
commit | 5c73e74034820ca2a85101a52622f1c92237edc0 (patch) | |
tree | 88e5cf7089d70904b60df48c1d80b3f763b3af86 /drivers/usb/phy | |
parent | usb: dwc2: handle the Host Port Interrupt when it occurs in device mode (diff) | |
download | linux-5c73e74034820ca2a85101a52622f1c92237edc0.tar.xz linux-5c73e74034820ca2a85101a52622f1c92237edc0.zip |
usb: phy: msm: tiny leak on error in probe()
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/phy')
-rw-r--r-- | drivers/usb/phy/phy-msm-usb.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |