tty: hvc_xen: NULL dereference on allocation failure
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 May 2012 08:47:47 +0000 (11:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 May 2012 15:48:45 +0000 (08:48 -0700)
commitbdb595b4a906b8124d0dc5ff852f84302e2e7955
treea4fc2dd1b5b52690b030845a05525cec0d267cc5
parent05f843b5d3406c29c8af7d1eb39ea9143b21d6dc
tty: hvc_xen: NULL dereference on allocation failure

If kzalloc() returns a NULL here, we pass a NULL to
xencons_disconnect_backend() which will cause an Oops.

Also I removed the __GFP_ZERO while I was at it since kzalloc() implies
__GFP_ZERO.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_xen.c