Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2879095rwb; Thu, 17 Nov 2022 18:08:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf5hndsbhOMxj3Wf3pA0a8BCuVkmGue3IqQ5ybISuidulryDeriSYnCQNtgcDMp260x3POuK X-Received: by 2002:a05:6a00:27a3:b0:56d:6450:9e49 with SMTP id bd35-20020a056a0027a300b0056d64509e49mr5607538pfb.54.1668737332805; Thu, 17 Nov 2022 18:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668737332; cv=none; d=google.com; s=arc-20160816; b=znZkSysKjsLOrnaeAyrd8WtfPR5w84Fo9CCrpr34UemlT+D+14dg2wv3/CI4ivozDV Y0JdHqoCrbxlt+EhX5ix95f5Dau/OZQNHQmtO44wQQzMG/mhqJGuYIdhJHjE+mZH8Jfb 9X3psf+YULKXHSi5pz+uSQMtBPJSHCEhvp/6mAkIb3SqUHBJEM9D28rWVCCicV4mTM3z v9pp/hqXTHHjwLUPuTudn4gqci3dwRsIVXqe3Ss5q+4jkCFgugz0DdKLOU2YfGlIVaD+ 2ox6s7xh/n6T20KQm+g8Q91VB8faa/QSJmT5oGpUfatENAKI/c2wY3OMTSIJrf4NR3b9 IVDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=X7Aeng1ICfvb0OQM7sDZSDixW9DIi837vPlquD3ZsVw=; b=swS5mX8mZavkxbnPSRAwyg5dCZuSXopFysl/3SM+086ACFUhJv9eczsGhVvuogMPM7 MHZ2T1L/eo0wBtwQrz9jJRx/70lXuFfbmN5M+sxx9XZmRFesy9HCJWtu3/OxlemuCc5e 1JsebdokPhGWNbPRREj/Ne/dVZvgEPUJix2mq0J8mq8ptK/M6ohsh/6W0AoK+uchW+qd B2f66BMUpmzoAVpqLleiFD2mxdNyPv/genrtcVKGzLSL3AtT8viNeHkT6KN2WqxQayi2 pkVKf5HXgR2YiyBeVFrQrrKYO7G6JyuvoksZaqPwUXsncfxWbvF9YBwQmEzsPeRmOFqH T+Uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a170902da8f00b00186a5b86ea3si3053776plx.50.2022.11.17.18.08.40; Thu, 17 Nov 2022 18:08:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241051AbiKRBr6 (ORCPT + 91 others); Thu, 17 Nov 2022 20:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241072AbiKRBrt (ORCPT ); Thu, 17 Nov 2022 20:47:49 -0500 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39FFD898F8; Thu, 17 Nov 2022 17:47:38 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id E6FD91E80D72; Fri, 18 Nov 2022 09:44:25 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7puBGY77IZMt; Fri, 18 Nov 2022 09:44:23 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id D465F1E80D70; Fri, 18 Nov 2022 09:44:22 +0800 (CST) From: Li zeming To: pabeni@redhat.com, vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: =?UTF-8?q?=5BPATCH=20v2=5D=20sctp=3A=20sm=5Fstatefuns=3A=20Remove=20unnecessary=20=E2=80=98NULL=E2=80=99=20values=20from=20Pointer?= Date: Fri, 18 Nov 2022 09:46:42 +0800 Message-Id: <20221118014641.3035-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 'packet' pointer is always set in the later code, no need to initialize it at definition time. Signed-off-by: Li zeming --- v2: Modify the submitted description. net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index f6ee7f4040c1..714605746fee 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -3781,7 +3781,7 @@ static enum sctp_disposition sctp_sf_shut_8_4_5( void *arg, struct sctp_cmd_seq *commands) { - struct sctp_packet *packet = NULL; + struct sctp_packet *packet; struct sctp_chunk *chunk = arg; struct sctp_chunk *shut; -- 2.18.2