[PATCH] drm/drv: Make use of local variable driver in drm_dev_register()
Thomas Zimmermann
tzimmermann at suse.de
Tue Dec 20 07:24:18 UTC 2022
Hi
Am 19.12.22 um 19:31 schrieb Uwe Kleine-König:
> There is a local variable that contains dev->driver. Make use of it
> instead of "open coding" it.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
Added to drm-misc-next. Thanks a lot.
Best regards
Thomas
> ---
> drivers/gpu/drm/drm_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 203bf8d6c34c..3cc8e8111d16 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -889,8 +889,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
>
> dev->registered = true;
>
> - if (dev->driver->load) {
> - ret = dev->driver->load(dev, flags);
> + if (driver->load) {
> + ret = driver->load(dev, flags);
> if (ret)
> goto err_minors;
> }
>
> base-commit: 678e5b2258e871b22fe8c26edac2723feb852a47
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221220/ff1ec948/attachment.sig>
More information about the dri-devel
mailing list