public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi-topcliff-pch: missing platform_driver_unregister() on error in pch_spi_init()
@ 2013-04-25  7:18 Wei Yongjun
  2013-04-25 10:58 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-04-25  7:18 UTC (permalink / raw)
  To: broonie, grant.likely; +Cc: yongjun_wei, spi-devel-general, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing platform_driver_unregister() before return
from pch_spi_init() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/spi/spi-topcliff-pch.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index f756481..c8b672e 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -1789,8 +1789,10 @@ static int __init pch_spi_init(void)
 		return ret;
 
 	ret = pci_register_driver(&pch_spi_pcidev_driver);
-	if (ret)
+	if (ret) {
+		platform_driver_unregister(&pch_spi_pd_driver);
 		return ret;
+	}
 
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi-topcliff-pch: missing platform_driver_unregister() on error in pch_spi_init()
  2013-04-25  7:18 [PATCH] spi-topcliff-pch: missing platform_driver_unregister() on error in pch_spi_init() Wei Yongjun
@ 2013-04-25 10:58 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-04-25 10:58 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: grant.likely, yongjun_wei, spi-devel-general, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

On Thu, Apr 25, 2013 at 03:18:02PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add the missing platform_driver_unregister() before return
> from pch_spi_init() in the error handling case.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-25 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25  7:18 [PATCH] spi-topcliff-pch: missing platform_driver_unregister() on error in pch_spi_init() Wei Yongjun
2013-04-25 10:58 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox