aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/enclosure.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/enclosure.c')
-rw-r--r--drivers/misc/enclosure.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
index 850706a5e553..7b039306037f 100644
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -315,6 +315,9 @@ int enclosure_add_device(struct enclosure_device *edev, int component,
315 315
316 cdev = &edev->component[component]; 316 cdev = &edev->component[component];
317 317
318 if (cdev->dev == dev)
319 return -EEXIST;
320
318 if (cdev->dev) 321 if (cdev->dev)
319 enclosure_remove_links(cdev); 322 enclosure_remove_links(cdev);
320 323