serial: ifx6x60: Free memory when probe fails
authorSouptick Joarder <jrdr.linux@gmail.com>
Fri, 28 Oct 2016 12:00:16 +0000 (17:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2016 13:50:46 +0000 (14:50 +0100)
commit0a940b0d252bb8616bb36a254f6a3273f007c3f3
tree10a1e7ab159e99d9a2d259e2c5b52208aeb86064
parent7f8b4ebeb2a1e7bf7af80926db012c9356f7a662
serial: ifx6x60: Free memory when probe fails

When spi_setup() fails it doesn't free ifx_dev and we have a memory
leak. Fix this by freeing ifx_dev before the return.

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