Skip to content

Commit 57626ff

Browse files
gclementgregkh
authored andcommitted
tty: n_gsm: Remove unnecessary test in gsm_print_packet()
If the length is zero then the print_hex_dump_bytes won't output anything, so testing the length before the call is unnecessary. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20200518084517.2173242-2-gregory.clement@bootlin.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 55484fc commit 57626ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/tty/n_gsm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,7 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
504504
else
505505
pr_cont("(F)");
506506

507-
if (dlen)
508-
print_hex_dump_bytes("", DUMP_PREFIX_NONE, data, dlen);
507+
print_hex_dump_bytes("", DUMP_PREFIX_NONE, data, dlen);
509508
}
510509

511510

0 commit comments

Comments
 (0)