From patchwork Fri Mar 22 07:16:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 1060899 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-rtc-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44QZhS6jHmz9sRW for ; Fri, 22 Mar 2019 18:16:24 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727824AbfCVHQX (ORCPT ); Fri, 22 Mar 2019 03:16:23 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44919 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727574AbfCVHQX (ORCPT ); Fri, 22 Mar 2019 03:16:23 -0400 X-Originating-IP: 182.72.246.220 Received: from localhost (unknown [182.72.246.220]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 1E424C0005; Fri, 22 Mar 2019 07:16:20 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Alexandre Belloni Subject: [PATCH 2/4] rtc: wm831x: remove unnecessary goto Date: Fri, 22 Mar 2019 08:16:09 +0100 Message-Id: <20190322071611.16407-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190322071611.16407-1-alexandre.belloni@bootlin.com> References: <20190322071611.16407-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org There is no specific handling in the error path of wm831x_rtc_probe, remove the unnecessary goto and label. Signed-off-by: Alexandre Belloni Acked-by: Charles Keepax --- drivers/rtc/rtc-wm831x.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index deaffe0eaf2f..1b0c3b3f63e8 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c @@ -429,7 +429,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev) ret = wm831x_reg_read(wm831x, WM831X_RTC_CONTROL); if (ret < 0) { dev_err(&pdev->dev, "Failed to read RTC control: %d\n", ret); - goto err; + return ret; } if (ret & WM831X_RTC_ALM_ENA) wm831x_rtc->alarm_enabled = 1; @@ -459,9 +459,6 @@ static int wm831x_rtc_probe(struct platform_device *pdev) wm831x_rtc_add_randomness(wm831x); return 0; - -err: - return ret; } static const struct dev_pm_ops wm831x_rtc_pm_ops = {