drm/vboxvideo: Set up fbdev after registering device; remove error checks
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 8 Apr 2020 08:26:40 +0000 (10:26 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 8 Apr 2020 14:25:02 +0000 (16:25 +0200)
Generic fbdev support is a DRM client. Set it up after registering
the new DRM device. Remove the error checks as the driver's probe
function should not depend on a DRM client's state.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-10-tzimmermann@suse.de
drivers/gpu/drm/vboxvideo/vbox_drv.c

index 13eaae7921f5730c1f7ec0d1124f612fb0cee484..d2112b43395a4574736c3f8538dace0fcbccfb4f 100644 (file)
@@ -78,14 +78,12 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (ret)
                goto err_mode_fini;
 
-       ret = drm_fbdev_generic_setup(&vbox->ddev, 32);
-       if (ret)
-               goto err_irq_fini;
-
        ret = drm_dev_register(&vbox->ddev, 0);
        if (ret)
                goto err_irq_fini;
 
+       drm_fbdev_generic_setup(&vbox->ddev, 32);
+
        return 0;
 
 err_irq_fini: