Thread (1 message) 1 message, 1 author, 2020-08-18

[PATCH 2/8] newport_con: fix no return statement in newport_show_logo

From: Jiri Slaby <hidden>
Date: 2020-08-18 08:58:39
Also in: dri-devel, linux-fbdev, linux-serial, lkml
Subsystem: console subsystem, framebuffer layer, the rest · Maintainers: Greg Kroah-Hartman, Helge Deller, Linus Torvalds

When CONFIG_LOGO_SGI_CLUT224 is unset, newport_show_logo contains no
return, despite it should return a pointer. Add one returning NULL to
fix a compiler warning:
   drivers/video/console/newport_con.c: In function 'newport_show_logo':
   drivers/video/console/newport_con.c:132:1: warning: no return statement in function returning non-void

Note that the caller expects NULL from the function already.

Signed-off-by: Jiri Slaby <redacted>
Cc: Bartlomiej Zolnierkiewicz <redacted>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-mips@vger.kernel.org
---
 drivers/video/console/newport_con.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c
index 72f146d047d9..4d9110393479 100644
--- a/drivers/video/console/newport_con.c
+++ b/drivers/video/console/newport_con.c
@@ -131,6 +131,8 @@ static const struct linux_logo *newport_show_logo(void)
 		npregs->go.hostrw0 = *data++ << 24;
 
 	return logo;
+#else
+	return NULL;
 #endif /* CONFIG_LOGO_SGI_CLUT224 */
 }
 
-- 
2.28.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help