From: Andre Przywara Date: Thu, 21 May 2015 16:26:14 +0000 (+0100) Subject: drivers: PL011: avoid potential unregister_driver call X-Git-Tag: omap-for-v4.2/wakeirq-drivers-v2^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49bb3c862cc418e3bc9464654e4ccb8ebb5cc2ec;p=pandora-kernel.git drivers: PL011: avoid potential unregister_driver call Although we care about not unregistering the driver if there are still ports connected during the .remove callback, we do miss this check in the pl011_probe function. So if the current port allocation fails, but there are other ports already registered, we will kill those. So factor out the port removal into a separate function and use that in the probe function, too. Signed-off-by: Andre Przywara Tested-by: Mark Langsdorf Tested-by: Naresh Bhat Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed