提交 0113f22e 编写于 作者: W Wei Yongjun 提交者: Mark Brown

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 a68b728f
...@@ -1789,8 +1789,10 @@ static int __init pch_spi_init(void) ...@@ -1789,8 +1789,10 @@ static int __init pch_spi_init(void)
return ret; return ret;
ret = pci_register_driver(&pch_spi_pcidev_driver); ret = pci_register_driver(&pch_spi_pcidev_driver);
if (ret) if (ret) {
platform_driver_unregister(&pch_spi_pd_driver);
return ret; return ret;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册