All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] driver core: don't initialize 'parent' in device_add()
@ 2017-03-17  6:54 Viresh Kumar
  0 siblings, 0 replies; only message in thread
From: Viresh Kumar @ 2017-03-17  6:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linaro-kernel, Vincent Guittot, Viresh Kumar, linux-kernel

'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>
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 684bda4d14a1..5fc1a50f7577 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1612,7 +1612,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;
-- 
2.12.0.432.g71c3a4f4ba37

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-17  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  6:54 [PATCH] driver core: don't initialize 'parent' in device_add() Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.