summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-09-17 18:04:47 +0000
committerAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>2020-09-17 18:04:47 +0000
commit58e5688a7517f13a134333c4610b98c67b20784b (patch)
tree479020a46438e10aeb3e2668b62aadc115d161cf /lib
parent628ae75fc1b45aa97bea8b979f833612efffbd4d (diff)
parentbdc3a8f6a8e8b798c46683a98b97d52b3a5708e4 (diff)
Merge tag 'v5.4.66' into 5.4-2.1.x-imx
This is the 5.4.66 stable release Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/kobject.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 386873bdd51c..0c6d17503a11 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -630,8 +630,12 @@ static void __kobject_del(struct kobject *kobj)
*/
void kobject_del(struct kobject *kobj)
{
- struct kobject *parent = kobj->parent;
+ struct kobject *parent;
+
+ if (!kobj)
+ return;
+ parent = kobj->parent;
__kobject_del(kobj);
kobject_put(parent);
}