serial: sunsu: Free memory when probe fails
authorSouptick Joarder <jrdr.linux@gmail.com>
Mon, 14 Nov 2016 12:14:49 +0000 (17:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Nov 2016 09:57:26 +0000 (10:57 +0100)
commitaf6f9d6883ac95d14271b4613e5813f2938dd4d4
treedde2f4c703fb6ff164c97831b75d82a69f844235
parentfbb7d2e3a9cc07dd56a9c4d337352b3b1cb34c89
serial: sunsu: Free memory when probe fails

When su_probe() fails it doesn't free *up and we may have a memory
leak. Fix this by freeing *up before return.

Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sunsu.c