drivers/tty/serial: extern function which for release resource, need check pointer...
authorChen Gang <gang.chen@asianux.com>
Thu, 27 Dec 2012 07:51:31 +0000 (15:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2013 07:00:44 +0000 (23:00 -0800)
commitb342dd512f7af0e0e14e29c3e1f863150cfc46ff
tree46deb7479d463bb04f426c46b38f12b64060bb01
parent074d35cebe96da07ac07f78118bc6a09e60350b5
drivers/tty/serial: extern function which for release resource, need check pointer, before free it

  for extern function uart_remove_one_port:
    need check pointer whether be NULL, before the main work.
    just like what the other extern function uart_add_one_port has done.
    uart_add_one_port and uart_remove_one_port are pair

  information:
    for the callers (such as drivers/tty/serial/jsm: jsm_tty.c, jsm_driver.c)
    they realy assume that:
      they still can call uart_remove_one_port, after uart_add_one_port failed
    we (as an extern function), have to understand it (just like kfree).

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c