diff options
author | Javier Martinez Canillas <javierm@redhat.com> | 2022-06-07 21:23:34 +0300 |
---|---|---|
committer | Javier Martinez Canillas <javierm@redhat.com> | 2022-06-29 10:51:31 +0300 |
commit | 9e121040e54abef9ed5542e5fdfa87911cd96204 (patch) | |
tree | 5dc052d0189913894d107e5f18dd08a76d652221 /drivers/firmware/sysfb.c | |
parent | 5f701324c0fb6f9f5aaac3f8d1575321375f6d8f (diff) | |
download | linux-9e121040e54abef9ed5542e5fdfa87911cd96204.tar.xz |
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; } |