mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
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>
This commit is contained in:
parent
a68b728f7a
commit
0113f22ee4
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user