aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 23:44:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 23:44:29 -0500
commitb07039b79c9ea64c1eacda1e01d645082e4a0d5d (patch)
tree61532ba8425fdf897d6a67a74391a1c6f322a07b /drivers/base/platform.c
parent02061181d3a9ccfe15ef6bc15fa56283acc47620 (diff)
parent16df1456aa858a86f398dbc7d27649eb6662b0cc (diff)
Merge tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the "big" set of driver core patches for 4.21-rc1. It's not really big, just a number of small changes for some reported issues, some documentation updates to hopefully make it harder for people to abuse the driver model, and some other minor cleanups. All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: mm, memory_hotplug: update a comment in unregister_memory() component: convert to DEFINE_SHOW_ATTRIBUTE sysfs: Disable lockdep for driver bind/unbind files driver core: Add missing dev->bus->need_parent_lock checks kobject: return error code if writing /sys/.../uevent fails driver core: Move async_synchronize_full call driver core: platform: Respect return code of platform_device_register_full() kref/kobject: Improve documentation drivers/base/memory.c: Use DEVICE_ATTR_RO and friends driver core: Replace simple_strto{l,ul} by kstrtou{l,ul} kernfs: Improve kernfs_notify() poll notification latency kobject: Fix warnings in lib/kobject_uevent.c kobject: drop unnecessary cast "%llu" for u64 driver core: fix comments for device_block_probing() driver core: Replace simple_strtol by kstrtoint
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r--drivers/base/platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 445cbd8266ca..be6c1eb3cbe2 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -234,7 +234,7 @@ struct platform_object {
234 */ 234 */
235void platform_device_put(struct platform_device *pdev) 235void platform_device_put(struct platform_device *pdev)
236{ 236{
237 if (pdev) 237 if (!IS_ERR_OR_NULL(pdev))
238 put_device(&pdev->dev); 238 put_device(&pdev->dev);
239} 239}
240EXPORT_SYMBOL_GPL(platform_device_put); 240EXPORT_SYMBOL_GPL(platform_device_put);
@@ -447,7 +447,7 @@ void platform_device_del(struct platform_device *pdev)
447{ 447{
448 int i; 448 int i;
449 449
450 if (pdev) { 450 if (!IS_ERR_OR_NULL(pdev)) {
451 device_del(&pdev->dev); 451 device_del(&pdev->dev);
452 452
453 if (pdev->id_auto) { 453 if (pdev->id_auto) {