diff options
author | Javier Martinez Canillas <javierm@redhat.com> | 2022-06-07 20:23:34 +0200 |
---|---|---|
committer | Javier Martinez Canillas <javierm@redhat.com> | 2022-06-09 16:11:00 +0200 |
commit | 0949ee75da6c918fcbd567e1bfa4943a56ab4e5d (patch) | |
tree | 185fd9e286818b39f5ce70d10258606b155ee55e /drivers/firmware/sysfb.c | |
parent | f17c655cfb99796918d96ae25261db2640407d01 (diff) | |
download | lwn-0949ee75da6c918fcbd567e1bfa4943a56ab4e5d.tar.gz lwn-0949ee75da6c918fcbd567e1bfa4943a56ab4e5d.zip |
firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer
This function just returned 0 on success or an errno code on error, but it
could be useful for sysfb_init() callers to have a pointer to the device.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-2-javierm@redhat.com
Diffstat (limited to 'drivers/firmware/sysfb.c')
-rw-r--r-- | drivers/firmware/sysfb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c index 2bfbb05f7d89..b032f40a92de 100644 --- a/drivers/firmware/sysfb.c +++ b/drivers/firmware/sysfb.c @@ -46,8 +46,8 @@ static __init int sysfb_init(void) /* try to create a simple-framebuffer device */ compatible = sysfb_parse_mode(si, &mode); if (compatible) { - ret = sysfb_create_simplefb(si, &mode); - if (!ret) + pd = sysfb_create_simplefb(si, &mode); + if (!IS_ERR(pd)) return 0; } |