diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/bus.c | 2 | ||||
-rw-r--r-- | drivers/base/core.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index cfe8615d5106..dd4b82d7510f 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -62,7 +62,7 @@ static struct subsys_private *bus_to_subsys(const struct bus_type *bus) struct subsys_private *sp = NULL; struct kobject *kobj; - if (!bus) + if (!bus || !bus_kset) return NULL; spin_lock(&bus_kset->list_lock); diff --git a/drivers/base/core.c b/drivers/base/core.c index e54a10b5dbd7..6878dfcbf0d6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -98,7 +98,7 @@ static int __fwnode_link_add(struct fwnode_handle *con, list_add(&link->s_hook, &sup->consumers); list_add(&link->c_hook, &con->suppliers); - pr_debug("%pfwP Linked as a fwnode consumer to %pfwP\n", + pr_debug("%pfwf Linked as a fwnode consumer to %pfwf\n", con, sup); return 0; @@ -122,7 +122,7 @@ int fwnode_link_add(struct fwnode_handle *con, struct fwnode_handle *sup) */ static void __fwnode_link_del(struct fwnode_link *link) { - pr_debug("%pfwP Dropping the fwnode link to %pfwP\n", + pr_debug("%pfwf Dropping the fwnode link to %pfwf\n", link->consumer, link->supplier); list_del(&link->s_hook); list_del(&link->c_hook); @@ -1062,7 +1062,7 @@ int device_links_check_suppliers(struct device *dev) if (!dev_is_best_effort(dev)) { fwnode_ret = -EPROBE_DEFER; dev_err_probe(dev, -EPROBE_DEFER, - "wait for supplier %pfwP\n", sup_fw); + "wait for supplier %pfwf\n", sup_fw); } else { fwnode_ret = -EAGAIN; } @@ -2046,9 +2046,9 @@ static int fw_devlink_create_devlink(struct device *con, goto out; } - if (!device_link_add(con, sup_dev, flags)) { - dev_err(con, "Failed to create device link with %s\n", - dev_name(sup_dev)); + if (con != sup_dev && !device_link_add(con, sup_dev, flags)) { + dev_err(con, "Failed to create device link (0x%x) with %s\n", + flags, dev_name(sup_dev)); ret = -EINVAL; } |