mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-26 05:34:30 +08:00
dm: core: remove redundant if statement
The value of parent is not changed in the first if statement. So we can merge the two if statements depending on parent. Indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2960107a22
commit
f93a07dd4f
@ -143,11 +143,9 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
|
||||
goto fail_alloc3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* put dev into parent's successor list */
|
||||
if (parent)
|
||||
/* put dev into parent's successor list */
|
||||
list_add_tail(&dev->sibling_node, &parent->child_head);
|
||||
}
|
||||
|
||||
ret = uclass_bind_device(dev);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user