do some real testing and fix the DRM initialising and unloading

main
Dave Airlie 2004-05-10 11:16:26 +00:00
parent c47b611b08
commit a1160ba279
2 changed files with 6 additions and 2 deletions

View File

@ -652,7 +652,9 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
class_simple_device_add(DRM(stub_info).drm_class,
MKDEV(DRM_MAJOR, dev->minor), &pdev->dev, "card%d", dev->minor);
return 0;
error_out_unreg:
DRM(stub_unregister)(dev->minor);
DRM(takedown)(dev);

View File

@ -652,7 +652,9 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
*/
class_simple_device_add(DRM(stub_info).drm_class,
MKDEV(DRM_MAJOR, dev->minor), &pdev->dev, "card%d", dev->minor);
return 0;
error_out_unreg:
DRM(stub_unregister)(dev->minor);
DRM(takedown)(dev);