diff mbox series

[v2] sctp: sm_statefuns: Remove unnecessary ‘NULL’ values from Pointer

Message ID 20221118014641.3035-1-zeming@nfschina.com (mailing list archive)
State Rejected
Headers show
Series [v2] sctp: sm_statefuns: Remove unnecessary ‘NULL’ values from Pointer | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Li zeming Nov. 18, 2022, 1:46 a.m. UTC
The 'packet' pointer is always set in the later code, no need to
initialize it at definition time.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 v2: Modify the submitted description.

 net/sctp/sm_statefuns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski Nov. 19, 2022, 3:30 a.m. UTC | #1
On Fri, 18 Nov 2022 09:46:42 +0800 Li zeming wrote:
> -	struct sctp_packet *packet = NULL;
> +	struct sctp_packet *packet;
>  	struct sctp_chunk *chunk = arg;
>  	struct sctp_chunk *shut;

Please don't sent such patches to networking.
diff mbox series

Patch

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;