aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Dan Carpenter <dan.carpenter@linaro.org> 2024-02-22 09:13:21 +0300
committerGravatar Thomas Zimmermann <tzimmermann@suse.de> 2024-02-27 09:21:06 +0100
commit9fa2679b7fe1bf4e6010051767d3c163b3aee68b (patch)
treeae480f386436201b08d3c78341cb8eaee23bb71f
parentMerge drm/drm-next into drm-misc-next-fixes (diff)
downloadlinux-9fa2679b7fe1bf4e6010051767d3c163b3aee68b.tar.gz
linux-9fa2679b7fe1bf4e6010051767d3c163b3aee68b.tar.bz2
linux-9fa2679b7fe1bf4e6010051767d3c163b3aee68b.zip
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: 4e754597d603 ("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
-rw-r--r--drivers/firmware/sysfb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c
index a6b48703dc9e..880ffcb50088 100644
--- a/drivers/firmware/sysfb.c
+++ b/drivers/firmware/sysfb.c
@@ -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);