lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 17 Mar 2017 12:24:22 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linaro-kernel@...ts.linaro.org,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...aro.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ