All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: of: display_timing: remove two unsafe error messages
@ 2014-05-13 12:58 Lucas Stach
  2014-05-15 10:47 ` Tomi Valkeinen
  2018-02-19 21:47   ` Vladimir Zapolskiy
  0 siblings, 2 replies; 6+ messages in thread
From: Lucas Stach @ 2014-05-13 12:58 UTC (permalink / raw)
  To: linux-fbdev

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: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/video/of_display_timing.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index ba5b40f581f6..3dc93cfacd47 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -115,10 +115,8 @@ int of_get_display_timing(struct device_node *np, const char *name,
 {
 	struct device_node *timing_np;
 
-	if (!np) {
-		pr_err("%s: no devicenode given\n", of_node_full_name(np));
+	if (!np)
 		return -EINVAL;
-	}
 
 	timing_np = of_get_child_by_name(np, name);
 	if (!timing_np) {
@@ -142,10 +140,8 @@ struct display_timings *of_get_display_timings(struct device_node *np)
 	struct device_node *native_mode;
 	struct display_timings *disp;
 
-	if (!np) {
-		pr_err("%s: no device node given\n", of_node_full_name(np));
+	if (!np)
 		return NULL;
-	}
 
 	timings_np = of_get_child_by_name(np, "display-timings");
 	if (!timings_np) {
-- 
2.0.0.rc0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-12 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 12:58 [PATCH] video: of: display_timing: remove two unsafe error messages Lucas Stach
2014-05-15 10:47 ` Tomi Valkeinen
2018-02-19 21:47 ` [PATCH] video: of: display_timing: Remove of_display_timings_exist() function Vladimir Zapolskiy
2018-02-19 21:47   ` Vladimir Zapolskiy
2018-03-12 15:48   ` Bartlomiej Zolnierkiewicz
2018-03-12 15:48     ` Bartlomiej Zolnierkiewicz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.