Commit e56db277 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8dbad66
...@@ -864,6 +864,7 @@ static int __init cfspi_init_module(void) ...@@ -864,6 +864,7 @@ static int __init cfspi_init_module(void)
driver_remove_file(&cfspi_spi_driver.driver, driver_remove_file(&cfspi_spi_driver.driver,
&driver_attr_up_head_align); &driver_attr_up_head_align);
err_create_up_head_align: err_create_up_head_align:
platform_driver_unregister(&cfspi_spi_driver);
err_dev_register: err_dev_register:
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment