From patchwork Sat Oct 21 11:05:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fenghui X-Patchwork-Id: 737509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D629C0032E for ; Sat, 21 Oct 2023 11:06:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbjJULGB (ORCPT ); Sat, 21 Oct 2023 07:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbjJULGA (ORCPT ); Sat, 21 Oct 2023 07:06:00 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 43FB5D65; Sat, 21 Oct 2023 04:05:56 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 4B149604DAB88; Sat, 21 Oct 2023 19:05:52 +0800 (CST) X-MD-Sfrom: fenghui@nfschina.com X-MD-SrcIP: 219.141.250.2 From: fenghui To: wim@linux-watchdog.org, linux@roeck-us.net Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, fenghui Subject: [PATCH] =?utf-8?q?watchdog=5Fdev=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_err?= Date: Sat, 21 Oct 2023 19:05:38 +0800 Message-Id: <20231021110538.441-1-fenghui@nfschina.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org err is assigned first, so it does not need to initialize the assignment. Signed-off-by: fenghui --- drivers/watchdog/watchdog_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 15df74e11a59..0868ccbcf92b 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -291,7 +291,7 @@ static int watchdog_start(struct watchdog_device *wdd) */ static int watchdog_stop(struct watchdog_device *wdd) { - int err = 0; + int err; if (!watchdog_active(wdd)) return 0;