[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200518084517.2173242-2-gregory.clement@bootlin.com>
Date: Mon, 18 May 2020 10:45:12 +0200
From: Gregory CLEMENT <gregory.clement@...tlin.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-kernel@...r.kernel.org
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Gregory CLEMENT <gregory.clement@...tlin.com>
Subject: [PATCH 1/2] 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@...tlin.com>
---
drivers/tty/n_gsm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 69200bd411f7..4465dd04fead 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -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);
}
--
2.26.2
Powered by blists - more mailing lists