Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0113f22e authored by Wei Yongjun's avatar Wei Yongjun Committed by Mark Brown
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a68b728f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
}