[PATCH 04/04] fbdev: maxine: fix maxinefb_init() return value

Randy Dunlap <[email protected]>
Newsgroups gmane.linux.kernel,gmane.comp.video.dri.devel
Message-ID <[email protected]>
A driver should return a negative error code on failure of its
module_init() function so that the system recognizes the failure.
Change the "return 1" to "return -ENODEV".

Suggested-by: [email protected]
Link: https://sashiko.dev/#/patchset/[email protected]?part=1
Signed-off-by: Randy Dunlap <[email protected]>
---
Cc: Helge Deller <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: "Maciej W. Rozycki" <[email protected]>

 drivers/video/fbdev/maxinefb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20260812.orig/drivers/video/fbdev/maxinefb.c
+++ linux-next-20260812/drivers/video/fbdev/maxinefb.c
@@ -160,7 +160,7 @@ static int __init maxinefb_init(void)
 	fb_alloc_cmap(&fb_info.cmap, 256, 0);
 
 	if (register_framebuffer(&fb_info) < 0)
-		return 1;
+		return -ENODEV;
 	return 0;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.