Commit d75b5869 authored by Federico Vaga's avatar Federico Vaga

kernel: get carrier module to prevent rmmod

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 3224767c
......@@ -524,8 +524,14 @@ int fa_probe(struct fmc_device *fmc)
if (err < 0)
goto out;
/* Pin the carrier */
if (!try_module_get(fmc->owner))
goto out_mod;
return 0;
out_mod:
fa_free_irqs(fa);
out:
while (--m, --i >= 0)
if (m->exit)
......@@ -550,6 +556,9 @@ int fa_remove(struct fmc_device *fmc)
fa->carrier_op->exit(fa);
/* Release the carrier */
module_put(fmc->owner);
return 0;
}
......
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