caif: spi: missing platform_driver_unregister() on error in cfspi_init_module()

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

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wei Yongjun 2013-04-25 15:15:23 +08:00 committed by David S. Miller
parent e8dbad66ef
commit e56db27768

View File

@ -864,6 +864,7 @@ static int __init cfspi_init_module(void)
driver_remove_file(&cfspi_spi_driver.driver,
&driver_attr_up_head_align);
err_create_up_head_align:
platform_driver_unregister(&cfspi_spi_driver);
err_dev_register:
return result;
}