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;
 }
 

Reply via email to