File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -113,16 +113,21 @@ static struct pcmcia_driver ssb_host_pcmcia_driver = {
113
113
.resume = ssb_host_pcmcia_resume ,
114
114
};
115
115
116
+ static int pcmcia_init_failed ;
117
+
116
118
/*
117
119
* These are not module init/exit functions!
118
120
* The module_pcmcia_driver() helper cannot be used here.
119
121
*/
120
122
int ssb_host_pcmcia_init (void )
121
123
{
122
- return pcmcia_register_driver (& ssb_host_pcmcia_driver );
124
+ pcmcia_init_failed = pcmcia_register_driver (& ssb_host_pcmcia_driver );
125
+
126
+ return pcmcia_init_failed ;
123
127
}
124
128
125
129
void ssb_host_pcmcia_exit (void )
126
130
{
127
- pcmcia_unregister_driver (& ssb_host_pcmcia_driver );
131
+ if (!pcmcia_init_failed )
132
+ pcmcia_unregister_driver (& ssb_host_pcmcia_driver );
128
133
}
You can’t perform that action at this time.
0 commit comments