Skip to content

Commit

Permalink
caif: spi: missing platform_driver_unregister() on error in cfspi_ini…
Browse files Browse the repository at this point in the history
…t_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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Apr 25, 2013
1 parent e8dbad6 commit e56db27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/caif/caif_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e56db27

Please sign in to comment.