summaryrefslogtreecommitdiff
path: root/drivers/net/caif
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-25 11:15:23 +0400
committerDavid S. Miller <davem@davemloft.net>2013-04-25 11:51:43 +0400
commite56db277684895184bc74fcf74f7ef993e3a5b6c (patch)
treed7101df7982ec2a5c7bdf93afe84e5f376da1c28 /drivers/net/caif
parente8dbad66ef56074eadb41ed5998acd2320447018 (diff)
downloadlinux-e56db277684895184bc74fcf74f7ef993e3a5b6c.tar.xz
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>
Diffstat (limited to 'drivers/net/caif')
-rw-r--r--drivers/net/caif/caif_spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index b71ce9bf0afb..ae7e756c6c65 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -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;
}