From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Mon, 15 Jan 2018 14:00:45 +0100 * Return an error code without storing it in an intermediate variable. * Delete the label "err_clk_alloc" and local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> --- drivers/mfd/omap-usb-tll.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index c8b4ad40910a..6c0be886fd87 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -216,7 +216,6 @@ static int usbtll_omap_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct resource *res; struct usbtll_omap *tll; - int ret = 0; int i, ver; dev_dbg(dev, "starting TI HSUSB TLL Controller\n"); @@ -254,8 +253,9 @@ static int usbtll_omap_probe(struct platform_device *pdev) tll->ch_clk = devm_kzalloc(dev, sizeof(struct clk *) * tll->nch, GFP_KERNEL); if (!tll->ch_clk) { - ret = -ENOMEM; - goto err_clk_alloc; + pm_runtime_put_sync(dev); + pm_runtime_disable(dev); + return -ENOMEM; } for (i = 0; i < tll->nch; i++) { @@ -278,12 +278,6 @@ static int usbtll_omap_probe(struct platform_device *pdev) spin_unlock(&tll_lock); return 0; - -err_clk_alloc: - pm_runtime_put_sync(dev); - pm_runtime_disable(dev); - - return ret; } /** -- 2.15.1 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html