From: Sachin Kamat Date: Mon, 7 Jan 2013 04:31:53 +0000 (+0530) Subject: usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=924d2532ab1897b034fa5477aea661732b91d748;p=openwrt%2Fstaging%2Fblogic.git usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get devm_regulator_bulk_get is device managed and makes exit code simpler. Signed-off-by: Sachin Kamat Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 52379b11f080..d2b8791bba28 100644 --- a/drivers/usb/gadget/s3c-hsudc.c +++ b/drivers/usb/gadget/s3c-hsudc.c @@ -1286,7 +1286,7 @@ static int s3c_hsudc_probe(struct platform_device *pdev) for (i = 0; i < ARRAY_SIZE(hsudc->supplies); i++) hsudc->supplies[i].supply = s3c_hsudc_supply_names[i]; - ret = regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), + ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(hsudc->supplies), hsudc->supplies); if (ret != 0) { dev_err(dev, "failed to request supplies: %d\n", ret); @@ -1367,7 +1367,6 @@ err_res: if (!IS_ERR_OR_NULL(hsudc->transceiver)) usb_put_phy(hsudc->transceiver); - regulator_bulk_free(ARRAY_SIZE(hsudc->supplies), hsudc->supplies); err_supplies: return ret; }