diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-07 19:53:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-07 19:53:36 +0200 |
commit | f558b8364e19f9222e7976c64e9367f66bab02cc (patch) | |
tree | c50c0fc9a3ab8430c4aaa1170d1cc1e08448bd7b /drivers/base/platform.c | |
parent | Merge tag 'staging-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | driver core: Update device link status correctly for SYNC_STATE_ONLY links (diff) | |
download | linux-f558b8364e19f9222e7976c64e9367f66bab02cc.tar.xz linux-f558b8364e19f9222e7976c64e9367f66bab02cc.zip |
Merge tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here is the set of driver core patches for 5.8-rc1.
Not all that huge this release, just a number of small fixes and
updates:
- software node fixes
- kobject now sends KOBJ_REMOVE when it is removed from sysfs, not
when it is removed from memory (which could come much later)
- device link additions and fixes based on testing on more devices
- firmware core cleanups
- other minor changes, full details in the shortlog
All have been in linux-next for a while with no reported issues"
* tag 'driver-core-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (23 commits)
driver core: Update device link status correctly for SYNC_STATE_ONLY links
firmware_loader: change enum fw_opt to u32
software node: implement software_node_unregister()
kobject: send KOBJ_REMOVE uevent when the object is removed from sysfs
driver core: Remove unnecessary is_fwnode_dev variable in device_add()
drivers property: When no children in primary, try secondary
driver core: platform: Fix spelling errors in platform.c
driver core: Remove check in driver_deferred_probe_force_trigger()
of: platform: Batch fwnode parsing when adding all top level devices
driver core: fw_devlink: Add support for batching fwnode parsing
driver core: Look for waiting consumers only for a fwnode's primary device
driver core: Move code to the right part of the file
Revert "Revert "driver core: Set fw_devlink to "permissive" behavior by default""
drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
firmware_loader: move fw_fallback_config to a private kernel symbol namespace
driver core: Add missing '\n' in log messages
driver/base/soc: Use kobj_to_dev() API
Add documentation on meaning of -EPROBE_DEFER
driver core: platform: remove redundant assignment to variable ret
debugfs: Use the correct style for SPDX License Identifier
...
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4b49641effa1..c0d0a5490ac6 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -682,7 +682,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister); struct platform_device *platform_device_register_full( const struct platform_device_info *pdevinfo) { - int ret = -ENOMEM; + int ret; struct platform_device *pdev; pdev = platform_device_alloc(pdevinfo->name, pdevinfo->id); @@ -863,6 +863,8 @@ int __init_or_module __platform_driver_probe(struct platform_driver *drv, /* temporary section violation during probe() */ drv->probe = probe; retval = code = __platform_driver_register(drv, module); + if (retval) + return retval; /* * Fixup that section violation, being paranoid about code scanning @@ -987,7 +989,7 @@ EXPORT_SYMBOL_GPL(__platform_register_drivers); * @drivers: an array of drivers to unregister * @count: the number of drivers to unregister * - * Unegisters platform drivers specified by an array. This is typically used + * Unregisters platform drivers specified by an array. This is typically used * to complement an earlier call to platform_register_drivers(). Drivers are * unregistered in the reverse order in which they were registered. */ |