Commit 63e83890 authored by Federico Vaga's avatar Federico Vaga

fmc: fixes from coccicheck and checkpatch

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 24ce6c09
......@@ -207,7 +207,7 @@ err_name:
err_i2c:
devm_kfree(&carrier->dev, slot);
err_alloc:
ida_simple_remove(&fmc_slot_ida, slot->dev.id);
ida_simple_remove(&fmc_slot_ida, id);
err_ida:
return ERR_PTR(err);
}
......@@ -219,11 +219,15 @@ err_ida:
*/
static void fmc_carrier_del_slot(struct fmc_slot *slot)
{
int id;
if (IS_ERR_OR_NULL(slot))
return;
id = slot->dev.id;
fmc_slot_eeprom_del(slot);
device_unregister(&slot->dev);
ida_simple_remove(&fmc_slot_ida, id);
}
/**
......
......@@ -6,7 +6,7 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
#if KERNEL_VERSION(3, 11, 0) > LINUX_VERSION_CODE
/*
* On kernel 3.11 and greater this is included
......
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