From patchwork Wed Mar 27 06:42:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ji-Ze Hong (Peter Hong)" X-Patchwork-Id: 10872815 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F28011390 for ; Wed, 27 Mar 2019 06:43:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA4DB28C2D for ; Wed, 27 Mar 2019 06:43:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE1D928C77; Wed, 27 Mar 2019 06:43:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4D3228C2D for ; Wed, 27 Mar 2019 06:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732615AbfC0GnB (ORCPT ); Wed, 27 Mar 2019 02:43:01 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36594 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbfC0GnA (ORCPT ); Wed, 27 Mar 2019 02:43:00 -0400 Received: by mail-pf1-f196.google.com with SMTP id p10so9268285pff.3; Tue, 26 Mar 2019 23:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Jy7F2QSsf5OTfixtg/4VNXIPeW3wBP1cuuaUxSIcMMA=; b=pvitqHl4Wz4/M52ef9EPVvoUKyFldCtAyYXHPqLkOPa7Cm9AKJcaCZTpzNFi/0WgEC 4UEzFFsQO1no14cCUsLzjWjG9dAREb+PZVOw8TycPf/llHtecYio9Ef6xqPwLtQWVlgl KikSBKb8aGIXYgNABQuG8h98qBAHA/6+7Fg1yq9uhqbqSAVgJ1dPpMX7uLzIMNJS0iVg 103fCgY9SuEBFnT/go6msGkhB6OLEVm+UytBoOhIWIHjr3N+dUnYBOhWk23ObMOy8XWX YVj1mGZyrjE5v6a3UL9NO5iPszGF4bqcPYWy+6Sm5YQJIy9CWnmN4sIEpj96BjjpMUoW PurQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Jy7F2QSsf5OTfixtg/4VNXIPeW3wBP1cuuaUxSIcMMA=; b=i1KXnvQsXG9jbHNTNCk5tuY/b9K33ouRbjHz9CZcfK5M/dwb6nfwWvaY43/L4DTbmr eJ9Z2okUDNUECdsRfiFNRJYl3PXHtmiUyaB0W9FxHXZsp0TAd5DbcqChd0qxnMGiX0Pe MpsuLwr86XIsmaT3D3vBoCv555GwJ+7JuA1Mt/FI3T3EkonZFarYsPVmOV3sQ/f7SxPH dJap/PXEesw/hQbcykV32ayWBfiJaIDICZTOcw0siCE9I7m9vxEKvppOFvwfjLOWXEd2 8EPwdUuqpk57SGEcjvx+H2Nhpo9JFzhaU0/T9vFRzAHsG/ld+UgfwsUtqlmDL7ZctBa6 1hqw== X-Gm-Message-State: APjAAAXIXJqKnaZcb5HD/UbLmQaZx3WejMunzR/0Kv/STLw0Cu8TisyC pizYAAYXjkpnvVrpfbDpWdxQyh1q X-Google-Smtp-Source: APXvYqzTL+Awbn/SXMSTQWAYApC+eFZm/MR4hORxtVsMRyCVa8BUjEF4CbGR8HWfpbuhuMvivjzzhQ== X-Received: by 2002:a63:6bc6:: with SMTP id g189mr33157008pgc.427.1553668980149; Tue, 26 Mar 2019 23:43:00 -0700 (PDT) Received: from localhost (59-120-186-245.HINET-IP.hinet.net. [59.120.186.245]) by smtp.gmail.com with ESMTPSA id q62sm25737760pga.32.2019.03.26.23.42.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 23:42:59 -0700 (PDT) From: "Ji-Ze Hong (Peter Hong)" X-Google-Original-From: "Ji-Ze Hong (Peter Hong)" To: peter_hong@fintek.com.tw, wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, "Ji-Ze Hong (Peter Hong)" Subject: [PATCH V2 1/2] watchdog: f71808e_wdt: separate declaration and assignment Date: Wed, 27 Mar 2019 14:42:50 +0800 Message-Id: <1553668971-18801-1-git-send-email-hpeter+linux_kernel@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Separate declaration and assignment in watchdog_start() Signed-off-by: Ji-Ze Hong (Peter Hong) Reviewed-by: Guenter Roeck --- drivers/watchdog/f71808e_wdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/f71808e_wdt.c b/drivers/watchdog/f71808e_wdt.c index 9a1c761258ce..bd2ced9f39f4 100644 --- a/drivers/watchdog/f71808e_wdt.c +++ b/drivers/watchdog/f71808e_wdt.c @@ -338,8 +338,10 @@ static int f71862fg_pin_configure(unsigned short ioaddr) static int watchdog_start(void) { + int err; + /* Make sure we don't die as soon as the watchdog is enabled below */ - int err = watchdog_keepalive(); + err = watchdog_keepalive(); if (err) return err;