diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-03-17 02:54:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-08 12:27:39 -0400 |
commit | 35dbf4efb044fbe4096a5edbb449e894aca9ef50 (patch) | |
tree | d4424b8a54e5da6dddad2c29a2b198440e2b211c | |
parent | 0dd89119614ba7afb6fe901a1760fa2e706cce86 (diff) |
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 <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
1607 | */ | 1607 | */ |
1608 | int device_add(struct device *dev) | 1608 | int device_add(struct device *dev) |
1609 | { | 1609 | { |
1610 | struct device *parent = NULL; | 1610 | struct device *parent; |
1611 | struct kobject *kobj; | 1611 | struct kobject *kobj; |
1612 | struct class_interface *class_intf; | 1612 | struct class_interface *class_intf; |
1613 | int error = -EINVAL; | 1613 | int error = -EINVAL; |