diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-02-22 09:13:21 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2024-02-27 09:21:06 +0100 |
commit | 9fa2679b7fe1bf4e6010051767d3c163b3aee68b (patch) | |
tree | ae480f386436201b08d3c78341cb8eaee23bb71f /drivers/firmware | |
parent | b0fda2fcb472454474b858a06419249d7eca56db (diff) |
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
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/sysfb.c | 4 |
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); |