From patchwork Sat Oct 21 10:57:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fenghui X-Patchwork-Id: 736888 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 2A9C6C001E0 for ; Sat, 21 Oct 2023 10:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbjJUK6Q (ORCPT ); Sat, 21 Oct 2023 06:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjJUK6Q (ORCPT ); Sat, 21 Oct 2023 06:58:16 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id ECC0E99; Sat, 21 Oct 2023 03:58:13 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id C813C604DAB8B; Sat, 21 Oct 2023 18:58:03 +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=5Fcore=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_ret?= Date: Sat, 21 Oct 2023 18:57:48 +0800 Message-Id: <20231021105748.18280-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 ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: fenghui --- drivers/watchdog/watchdog_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index 5b55ccae06d4..dceaf5cc89fd 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -194,7 +194,7 @@ static int watchdog_pm_notifier(struct notifier_block *nb, unsigned long mode, void *data) { struct watchdog_device *wdd; - int ret = 0; + int ret; wdd = container_of(nb, struct watchdog_device, pm_nb);