]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8f64b9776c3e0379d240b26b763218d6b433faaa
tree46deb7479d463bb04f426c46b38f12b64060bb01
parent98698315b281ebd24374b7e62bce20cc12f2db9c
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