Skip to content

Commit

Permalink
tty: n_gsm: Remove unnecessary test in gsm_print_packet()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gregory CLEMENT authored and Greg Kroah-Hartman committed May 19, 2020
1 parent 55484fc commit 57626ff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/n_gsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
else
pr_cont("(F)");

if (dlen)
print_hex_dump_bytes("", DUMP_PREFIX_NONE, data, dlen);
print_hex_dump_bytes("", DUMP_PREFIX_NONE, data, dlen);
}


Expand Down

0 comments on commit 57626ff

Please sign in to comment.