提交 f93a07dd 编写于 作者: H Heinrich Schuchardt 提交者: Simon Glass

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: NHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 2960107a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册