diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_stub.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index f7985c303cb0..ea7f9e5d47fa 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
@@ -237,9 +237,6 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev, | |||
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | if (dev->driver->load) | ||
241 | if ((retcode = dev->driver->load(dev, ent->driver_data))) | ||
242 | goto error_out_unreg; | ||
243 | 240 | ||
244 | retcode = drm_ctxbitmap_init(dev); | 241 | retcode = drm_ctxbitmap_init(dev); |
245 | if (retcode) { | 242 | if (retcode) { |
@@ -368,6 +365,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | |||
368 | if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY))) | 365 | if ((ret = drm_get_minor(dev, &dev->primary, DRM_MINOR_LEGACY))) |
369 | goto err_g2; | 366 | goto err_g2; |
370 | 367 | ||
368 | if (dev->driver->load) | ||
369 | if ((ret = dev->driver->load(dev, ent->driver_data))) | ||
370 | goto err_g3; | ||
371 | |||
371 | list_add_tail(&dev->driver_item, &driver->device_list); | 372 | list_add_tail(&dev->driver_item, &driver->device_list); |
372 | 373 | ||
373 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", | 374 | DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n", |
@@ -376,6 +377,8 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | |||
376 | 377 | ||
377 | return 0; | 378 | return 0; |
378 | 379 | ||
380 | err_g3: | ||
381 | drm_put_minor(&dev->primary); | ||
379 | err_g2: | 382 | err_g2: |
380 | pci_disable_device(pdev); | 383 | pci_disable_device(pdev); |
381 | err_g1: | 384 | err_g1: |