From: Thomas Zimmermann Date: Wed, 8 Apr 2020 08:26:32 +0000 (+0200) Subject: drm/ast: Set up fbdev after registering device; remove error checks X-Git-Tag: v5.15~303^2~28^2~3020 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4cbf268afee2b292359dc7af939ebcfc0694c9d;p=platform%2Fkernel%2Flinux-starfive.git drm/ast: 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 Reviewed-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20200408082641.590-2-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 30aa73a..b7ba22d 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c @@ -32,6 +32,7 @@ #include #include +#include #include #include @@ -111,6 +112,8 @@ static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (ret) goto err_ast_driver_unload; + drm_fbdev_generic_setup(dev, 32); + return 0; err_ast_driver_unload: diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 18a0a4c..e5398e3 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -512,10 +511,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) drm_mode_config_reset(dev); - ret = drm_fbdev_generic_setup(dev, 32); - if (ret) - goto out_free; - return 0; out_free: kfree(ast);