Skip to content

Commit 9fa2679

Browse files
Dan CarpenterThomas Zimmermann
authored andcommitted
firmware/sysfb: fix an error code in sysfb_init()
This error path accidentally returns success when it should preserve the error code from sysfb_parent_dev(). Fixes: 4e75459 ("firmware/sysfb: Create firmware device only for enabled PCI devices") Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/aaaa2e13-849b-41a0-8186-25f3d2a16f86@moroto.mountain
1 parent b0fda2f commit 9fa2679

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/firmware/sysfb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ static __init int sysfb_init(void)
127127
sysfb_apply_efi_quirks();
128128

129129
parent = sysfb_parent_dev(si);
130-
if (IS_ERR(parent))
130+
if (IS_ERR(parent)) {
131+
ret = PTR_ERR(parent);
131132
goto unlock_mutex;
133+
}
132134

133135
/* try to create a simple-framebuffer device */
134136
compatible = sysfb_parse_mode(si, &mode);

0 commit comments

Comments
 (0)