linux/drivers/tty/serial/jsm
Guilherme G. Piccoli 8ca31ba8bb tty: serial: jsm: Remove unnecessary NULL checks
After inspection made by Markus using Coccinelle software, he
observed that we could possibly be triggering a NULL pointer
dereference in 2 functions [0].

After discussion in mailing list, it was observed in fact
we have two unnecessary checks for NULL pointer, and they
were leading to Coccinelle warn. So, instead of reworking
the code as proposed by him, we hereby remove the
unnecessary checks, and also some unneeded extra lines in
the code.

These two unnecessary NULL checks were tracked in the call
chain as never NULL, so they can be safely removed.
No functional changes are intended.

[0] https://lkml.org/lkml/2017/11/29/705

Suggested-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-09 16:37:03 +01:00
..
jsm_cls.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
jsm_driver.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
jsm_neo.c tty: serial: jsm: Remove unnecessary NULL checks 2018-01-09 16:37:03 +01:00
jsm_tty.c tty: serial: jsm: Remove unnecessary NULL checks 2018-01-09 16:37:03 +01:00
jsm.h tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
Makefile drivers: serial: jsm: Add the Classic board implementation 2014-11-06 15:17:34 -08:00