diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-25 03:18:02 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-25 06:57:38 -0400 |
commit | 0113f22ee49ff1972de55632dda44eb9299e625d (patch) | |
tree | c0804a1da07c4a20ebe0a79604a02ac184db116f /drivers/spi/spi-topcliff-pch.c | |
parent | a68b728f7a217ce30b0eb77f6cb8e955d6ce6841 (diff) |
spi-topcliff-pch: missing platform_driver_unregister() on error in pch_spi_init()
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/spi/spi-topcliff-pch.c')
-rw-r--r-- | drivers/spi/spi-topcliff-pch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c index f756481b0fea..c8b672e07ba0 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) | |||
1789 | return ret; | 1789 | return ret; |
1790 | 1790 | ||
1791 | ret = pci_register_driver(&pch_spi_pcidev_driver); | 1791 | ret = pci_register_driver(&pch_spi_pcidev_driver); |
1792 | if (ret) | 1792 | if (ret) { |
1793 | platform_driver_unregister(&pch_spi_pd_driver); | ||
1793 | return ret; | 1794 | return ret; |
1795 | } | ||
1794 | 1796 | ||
1795 | return 0; | 1797 | return 0; |
1796 | } | 1798 | } |