Commit 9fa2679b authored by Dan Carpenter's avatar Dan Carpenter Committed by Thomas Zimmermann

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: 4e754597 ("firmware/sysfb: Create firmware device only for enabled PCI devices")
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/aaaa2e13-849b-41a0-8186-25f3d2a16f86@moroto.mountain
parent b0fda2fc
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment