提交 dc42715f 编写于 作者: L Lucas Stach 提交者: Tomi Valkeinen

video: of: display_timing: remove two unsafe error messages

The error message would try to dereference the pointer that
just has been tested to be NULL. As those messages don't
really add any value without the info that the np could
provide, just remove them.
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 34bdb666
...@@ -115,10 +115,8 @@ int of_get_display_timing(struct device_node *np, const char *name, ...@@ -115,10 +115,8 @@ int of_get_display_timing(struct device_node *np, const char *name,
{ {
struct device_node *timing_np; struct device_node *timing_np;
if (!np) { if (!np)
pr_err("%s: no devicenode given\n", of_node_full_name(np));
return -EINVAL; return -EINVAL;
}
timing_np = of_get_child_by_name(np, name); timing_np = of_get_child_by_name(np, name);
if (!timing_np) { if (!timing_np) {
...@@ -142,10 +140,8 @@ struct display_timings *of_get_display_timings(struct device_node *np) ...@@ -142,10 +140,8 @@ struct display_timings *of_get_display_timings(struct device_node *np)
struct device_node *native_mode; struct device_node *native_mode;
struct display_timings *disp; struct display_timings *disp;
if (!np) { if (!np)
pr_err("%s: no device node given\n", of_node_full_name(np));
return NULL; return NULL;
}
timings_np = of_get_child_by_name(np, "display-timings"); timings_np = of_get_child_by_name(np, "display-timings");
if (!timings_np) { if (!timings_np) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册