From: Jiri Slaby Date: Thu, 18 Oct 2012 20:26:35 +0000 (+0200) Subject: TTY: n_tty, simplify read_buf+echo_buf allocation X-Git-Tag: omap-for-v3.8/cleanup-headers-serial-take2-signed~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b91939f528fa80e95a7e9592425dd1026d159b2a;p=pandora-kernel.git TTY: n_tty, simplify read_buf+echo_buf allocation ldisc->open and close are called only once and cannot cross. So the tests in open and close are superfluous. Remove them. (But leave sets to NULL to ensure there is not a bug somewhere.) And when the tests are gone, handle properly failures in open. We leaked read_buf if allocation of echo_buf failed before. Now this is not the case anymore. Signed-off-by: Jiri Slaby Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed