pcmcia: synclink_cs: fix error handling in mgslpc_probe()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Thu, 7 Feb 2013 00:00:34 +0000 (01:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Feb 2013 20:21:19 +0000 (12:21 -0800)
commitd34138d057628211b1c835e13a64d0cc2423c969
treedf6748f0f35437ceb4e3d0fdd49e8f6db2957cb4
parentb95d788ac72b86515842a4eb92bb58a8da76a975
pcmcia: synclink_cs: fix error handling in mgslpc_probe()

mgslpc_probe() ignores errors in mgslpc_add_device() and
does not release all resource if mgslpc_config() failed.

The patch adds returned code to mgslpc_add_device()
and fixes the both issues.

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/char/pcmcia/synclink_cs.c