diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-09-16 09:56:27 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-09-16 09:56:27 -0700 |
| commit | 0898782247ae533d1f4e47a06bc5d4870931b284 (patch) | |
| tree | 21f75cc590542a870f42350b9410fc0588f02b79 /lib/kobject.c | |
| parent | 0c043d70d04711fe6c380df9065fdc44192c49bf (diff) | |
| parent | 410f25de467ee94c1a577c6ee7370c37b376c17c (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 5.4 merge window.
Diffstat (limited to 'lib/kobject.c')
| -rw-r--r-- | lib/kobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index f2ccdbac8ed9..83198cb37d8d 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -498,8 +498,10 @@ int kobject_rename(struct kobject *kobj, const char *new_name) kobj = kobject_get(kobj); if (!kobj) return -EINVAL; - if (!kobj->parent) + if (!kobj->parent) { + kobject_put(kobj); return -EINVAL; + } devpath = kobject_get_path(kobj, GFP_KERNEL); if (!devpath) { |
