summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-09-16 21:26:52 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-09-16 21:26:52 +0300
commit205d0494782ff7062afedf8945c085b49ccada7d (patch)
tree1def055272108e306ce2b884c66c45f19e708a38 /drivers
parentfd455e77a67690aab2aae885fa0e2e2a9b98bd2b (diff)
parent139e08188babf7a4c5f0df54b605105852fc347a (diff)
downloadlinux-205d0494782ff7062afedf8945c085b49ccada7d.tar.xz
Merge tag 'driver-core-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH: "Here is a single driver core fix for a much-reported-by-sysbot issue that showed up in 6.6-rc1. It's been submitted by many people, all in the same way, so it obviously fixes things for them all. Also in here is a single documentation update adding riscv to the embargoed hardware document in case there are any future issues with that processor family. Both of these have been in linux-next with no reported problems" * tag 'driver-core-6.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: embargoed-hardware-issues.rst: Add myself for RISC-V driver core: return an error when dev_set_name() hasn't happened
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index b7d7f410c256..4d8b315c48a1 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -3537,6 +3537,8 @@ int device_add(struct device *dev)
/* subsystems can specify simple device enumeration */
else if (dev->bus && dev->bus->dev_name)
error = dev_set_name(dev, "%s%u", dev->bus->dev_name, dev->id);
+ else
+ error = -EINVAL;
if (error)
goto name_error;