aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/fmc/fmc-core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/fmc/fmc-core.c b/drivers/fmc/fmc-core.c
index 24d52497524d..5a5e616c6324 100644
--- a/drivers/fmc/fmc-core.c
+++ b/drivers/fmc/fmc-core.c
@@ -154,7 +154,7 @@ int fmc_device_register_n(struct fmc_device **devs, int n)
154 ret = -EINVAL; 154 ret = -EINVAL;
155 break; 155 break;
156 } 156 }
157 if (fmc->flags == FMC_DEVICE_NO_MEZZANINE) { 157 if (fmc->flags & FMC_DEVICE_NO_MEZZANINE) {
158 dev_info(fmc->hwdev, "absent mezzanine in slot %d\n", 158 dev_info(fmc->hwdev, "absent mezzanine in slot %d\n",
159 fmc->slot_id); 159 fmc->slot_id);
160 continue; 160 continue;
@@ -189,9 +189,6 @@ int fmc_device_register_n(struct fmc_device **devs, int n)
189 for (i = 0; i < n; i++) { 189 for (i = 0; i < n; i++) {
190 fmc = devarray[i]; 190 fmc = devarray[i];
191 191
192 if (fmc->flags == FMC_DEVICE_NO_MEZZANINE)
193 continue; /* dev_info already done above */
194
195 fmc->nr_slots = n; /* each slot must know how many are there */ 192 fmc->nr_slots = n; /* each slot must know how many are there */
196 fmc->devarray = devarray; 193 fmc->devarray = devarray;
197 194
@@ -263,8 +260,6 @@ void fmc_device_unregister_n(struct fmc_device **devs, int n)
263 kfree(devs[0]->devarray); 260 kfree(devs[0]->devarray);
264 261
265 for (i = 0; i < n; i++) { 262 for (i = 0; i < n; i++) {
266 if (devs[i]->flags == FMC_DEVICE_NO_MEZZANINE)
267 continue;
268 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr); 263 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr);
269 device_del(&devs[i]->dev); 264 device_del(&devs[i]->dev);
270 fmc_free_id_info(devs[i]); 265 fmc_free_id_info(devs[i]);