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>
This commit is contained in:
parent
0dd8911961
commit
35dbf4efb0
@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev)
|
|||||||
*/
|
*/
|
||||||
int device_add(struct device *dev)
|
int device_add(struct device *dev)
|
||||||
{
|
{
|
||||||
struct device *parent = NULL;
|
struct device *parent;
|
||||||
struct kobject *kobj;
|
struct kobject *kobj;
|
||||||
struct class_interface *class_intf;
|
struct class_interface *class_intf;
|
||||||
int error = -EINVAL;
|
int error = -EINVAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user