···186186187187 spin_lock_init(&socket->lock);188188189189- if (socket->resource_ops->init) {190190- ret = socket->resource_ops->init(socket);191191- if (ret)192192- return (ret);193193- }194194-195189 /* try to obtain a socket number [yes, it gets ugly if we196190 * register more than 2^sizeof(unsigned int) pcmcia197191 * sockets... but the socket number is deprecated···232238 init_completion(&socket->thread_done);233239 mutex_init(&socket->skt_mutex);234240 spin_lock_init(&socket->thread_lock);241241+242242+ if (socket->resource_ops->init) {243243+ ret = socket->resource_ops->init(socket);244244+ if (ret)245245+ goto err;246246+ }235247236248 tsk = kthread_run(pccardd, socket, "pccardd");237249 if (IS_ERR(tsk)) {