OSDN Git Service

uio: pruss: fix error handling in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 2 Aug 2018 07:15:58 +0000 (10:15 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Aug 2018 08:14:26 +0000 (10:14 +0200)
commit95883676e34ab93f600787cc9831707bcdad4398
tree5427e08e1a67dde399bf92390a19439c12a44b30
parent7ceb1c37533e2298797188087796dd44931d86af
uio: pruss: fix error handling in probe

There are two bugs here.  First the error codes weren't set on several
paths.  And second, if the call to request_threaded_irq() inside
uio_register_device() fails then it would lead to a double free when
we call uio_unregister_device() inside pruss_cleanup().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_pruss.c