]> Git Repo - J-linux.git/commitdiff
firmware/sysfb: fix an error code in sysfb_init()
authorDan Carpenter <[email protected]>
Thu, 22 Feb 2024 06:13:21 +0000 (09:13 +0300)
committerThomas Zimmermann <[email protected]>
Tue, 27 Feb 2024 08:21:06 +0000 (09:21 +0100)
This error path accidentally returns success when it should preserve the
error code from sysfb_parent_dev().

Fixes: 4e754597d603 ("firmware/sysfb: Create firmware device only for enabled PCI devices")
Reviewed-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/firmware/sysfb.c

index a6b48703dc9e9671e8583324f875116094eb7b86..880ffcb50088750423134ad7922ce9427c8e2b23 100644 (file)
@@ -127,8 +127,10 @@ static __init int sysfb_init(void)
        sysfb_apply_efi_quirks();
 
        parent = sysfb_parent_dev(si);
-       if (IS_ERR(parent))
+       if (IS_ERR(parent)) {
+               ret = PTR_ERR(parent);
                goto unlock_mutex;
+       }
 
        /* try to create a simple-framebuffer device */
        compatible = sysfb_parse_mode(si, &mode);
This page took 0.045607 seconds and 4 git commands to generate.