From: Viresh Kumar Date: Fri, 17 Mar 2017 06:54:22 +0000 (+0530) Subject: driver core: don't initialize 'parent' in device_add() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35dbf4efb044fbe4096a5edbb449e894aca9ef50;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git driver core: don't initialize 'parent' in device_add() 'parent' is always overwritten before getting used and there is no need to initialize it with NULL. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 6bb60fb6a30b..bbecaf9293be 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev) */ int device_add(struct device *dev) { - struct device *parent = NULL; + struct device *parent; struct kobject *kobj; struct class_interface *class_intf; int error = -EINVAL;