diff options
Diffstat (limited to 'drivers/base/devcoredump.c')
-rw-r--r-- | drivers/base/devcoredump.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/base/devcoredump.c b/drivers/base/devcoredump.c index 9243468e2c99..352de5d41466 100644 --- a/drivers/base/devcoredump.c +++ b/drivers/base/devcoredump.c @@ -292,13 +292,16 @@ void dev_coredumpm(struct device *dev, struct module *owner, if (device_add(&devcd->devcd_dev)) goto put_device; + /* + * These should normally not fail, but there is no problem + * continuing without the links, so just warn instead of + * failing. + */ if (sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj, - "failing_device")) - /* nothing - symlink will be missing */; - - if (sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj, - "devcoredump")) - /* nothing - symlink will be missing */; + "failing_device") || + sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj, + "devcoredump")) + dev_warn(dev, "devcoredump create_link failed\n"); INIT_DELAYED_WORK(&devcd->del_wk, devcd_del); schedule_delayed_work(&devcd->del_wk, DEVCD_TIMEOUT); |