tty: synclinkmp: do not ignore errors in probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 23 Oct 2015 23:27:43 +0000 (02:27 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 07:27:46 +0000 (23:27 -0800)
commitb1209983d2c012be8d253ed118f9281ed9f46af6
tree20524ddad2ad10fcf54ccc9266469bedfb32e366
parent1051937d465665e3360ea7d9a3d2adfd86f47dd4
tty: synclinkmp: do not ignore errors in probe()

synclinkmp_init_one() ignores all errors and does not release
all resources if something fails.

The patch adds returned code to device_init() and add_device()
and proper error handling.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/synclinkmp.c