From patchwork Thu Oct 25 15:19:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 1645191 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7F99340135 for ; Thu, 25 Oct 2012 15:20:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946257Ab2JYPTz (ORCPT ); Thu, 25 Oct 2012 11:19:55 -0400 Received: from filtteri2.pp.htv.fi ([213.243.153.185]:37244 "EHLO filtteri2.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946214Ab2JYPTf (ORCPT ); Thu, 25 Oct 2012 11:19:35 -0400 Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id A7D9619B7B0; Thu, 25 Oct 2012 18:19:34 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id erH9yPBJc+0N; Thu, 25 Oct 2012 18:19:34 +0300 (EEST) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp4.welho.com (Postfix) with ESMTP id 690915BC015; Thu, 25 Oct 2012 18:19:34 +0300 (EEST) From: Aaro Koskinen To: wim@iguana.be, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Cc: Aaro Koskinen Subject: [RESEND PATCH v3 6/6] watchdog: omap_wdt: eliminate goto Date: Thu, 25 Oct 2012 18:19:12 +0300 Message-Id: <1351178352-3989-7-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1351178352-3989-1-git-send-email-aaro.koskinen@iki.fi> References: <1351178352-3989-1-git-send-email-aaro.koskinen@iki.fi> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Eliminate a goto to simplify the code. Signed-off-by: Aaro Koskinen --- drivers/watchdog/omap_wdt.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index af1e72e..bee43a9 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c @@ -267,8 +267,10 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) __omap_wdt_disable(wdev); ret = watchdog_register_device(omap_wdt); - if (ret) - goto err_misc; + if (ret) { + pm_runtime_disable(wdev->dev); + return ret; + } pr_info("OMAP Watchdog Timer Rev 0x%02x: initial timeout %d sec\n", __raw_readl(wdev->base + OMAP_WATCHDOG_REV) & 0xFF, @@ -277,11 +279,6 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev) pm_runtime_put_sync(wdev->dev); return 0; - -err_misc: - pm_runtime_disable(wdev->dev); - - return ret; } static void omap_wdt_shutdown(struct platform_device *pdev)