summaryrefslogtreecommitdiff
path: root/drivers/usb/phy/phy-gpio-vbus-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/phy/phy-gpio-vbus-usb.c')
-rw-r--r--drivers/usb/phy/phy-gpio-vbus-usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-gpio-vbus-usb.c b/drivers/usb/phy/phy-gpio-vbus-usb.c
index ea9e705555df..f4b14bd97e14 100644
--- a/drivers/usb/phy/phy-gpio-vbus-usb.c
+++ b/drivers/usb/phy/phy-gpio-vbus-usb.c
@@ -260,10 +260,8 @@ static int gpio_vbus_probe(struct platform_device *pdev)
gpio_vbus->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
GFP_KERNEL);
- if (!gpio_vbus->phy.otg) {
- kfree(gpio_vbus);
+ if (!gpio_vbus->phy.otg)
return -ENOMEM;
- }
platform_set_drvdata(pdev, gpio_vbus);
gpio_vbus->dev = &pdev->dev;