]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: uio_dmem_genirq: Fix memory leak in uio_dmem_genirq_probe()
authorDaeseok Youn <daeseok.youn@gmail.com>
Thu, 22 May 2014 00:46:12 +0000 (09:46 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 21:11:06 +0000 (14:11 -0700)
commit44773ce4e7f3842c6451f30202e39af97c578e58
tree067f59413cfd55aede6c0216018724ebd85194cf
parent4f7e4880553ff8cfaa480bdb377bb9cf9774a469
drivers: uio_dmem_genirq: Fix memory leak in uio_dmem_genirq_probe()

When platform_get_irq() is failed after "priv" allocated,
it need to free "priv". But the label of bad0 doesn't try
to free about "priv". So this patch changes that lable to "bad1".
But "bad1" has pm_runtime_disable() call, this function should
be called when uio_register_device() is failed. So it is moved
into handling error for uio_register_device().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_dmem_genirq.c