Skip to content

Commit fc54048

Browse files
author
Thomas Zimmermann
committed
drm/mgag200: Set up fbdev after registering device; remove error checks
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 <[email protected]> Reviewed-by: Noralf Trønnes <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Acked-by: Gerd Hoffmann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c05ca21 commit fc54048

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/gpu/drm/mgag200/mgag200_drv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ static int mga_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
7777
if (ret)
7878
goto err_mgag200_driver_unload;
7979

80+
drm_fbdev_generic_setup(dev, 0);
81+
8082
return 0;
8183

8284
err_mgag200_driver_unload:

drivers/gpu/drm/mgag200/mgag200_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,6 @@ int mgag200_driver_load(struct drm_device *dev, unsigned long flags)
181181
dev_warn(&dev->pdev->dev,
182182
"Could not initialize cursors. Not doing hardware cursors.\n");
183183

184-
r = drm_fbdev_generic_setup(mdev->dev, 0);
185-
if (r)
186-
goto err_modeset;
187-
188184
return 0;
189185

190186
err_modeset:

0 commit comments

Comments
 (0)