projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dd8911
)
driver core: don't initialize 'parent' in device_add()
author
Viresh Kumar
<viresh.kumar@linaro.org>
Fri, 17 Mar 2017 06:54:22 +0000
(12:24 +0530)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 16:27:39 +0000
(18:27 +0200)
'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>
drivers/base/core.c
patch
|
blob
|
history
diff --git
a/drivers/base/core.c
b/drivers/base/core.c
index
6bb60fb
..
bbecaf9
100644
(file)
--- 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;