[PATCH] drm/drv: Make use of local variable driver in drm_dev_register()

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Dec 19 18:31:47 UTC 2022


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>
---
 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
-- 
2.38.1



More information about the dri-devel mailing list