diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-12-16 15:53:52 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-12-16 15:53:52 +0100 |
commit | d09476018bee39495d6ece7a2e069de29a9c0ed5 (patch) | |
tree | 866fff4323f94681e6b423f269f0549df0a34066 /drivers/misc/enclosure.c | |
parent | ALSA: atmel_abdac: clk_round_rate() can return a zero upon error (diff) | |
parent | Merge tag 'asoc-v3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/b... (diff) | |
download | linux-d09476018bee39495d6ece7a2e069de29a9c0ed5.tar.xz linux-d09476018bee39495d6ece7a2e069de29a9c0ed5.zip |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'drivers/misc/enclosure.c')
-rw-r--r-- | drivers/misc/enclosure.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c index 0e8df41aaf14..2cf2bbc0b927 100644 --- a/drivers/misc/enclosure.c +++ b/drivers/misc/enclosure.c @@ -198,6 +198,13 @@ static void enclosure_remove_links(struct enclosure_component *cdev) { char name[ENCLOSURE_NAME_SIZE]; + /* + * In odd circumstances, like multipath devices, something else may + * already have removed the links, so check for this condition first. + */ + if (!cdev->dev->kobj.sd) + return; + enclosure_link_name(cdev, name); sysfs_remove_link(&cdev->dev->kobj, name); sysfs_remove_link(&cdev->cdev.kobj, "device"); |