Re: [PATCH] drm: Remove the deprecated drm_put_dev() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 2023/6/27 16:41, Sui Jingfeng wrote:
I have verified that

if the ->probe() failed, then the ->remove will be get called.

Sorry,

if the ->probe() failed, then the ->remove() will *NOT* get called.


I'm doing the test by add a line before the drm_dev_alloc()

I do the test by adding one line code before the drm_dev_alloc() function

 to generate a fault(error) manually,



See below:

```

    return -ENODEV;

    dev = drm_dev_alloc(&kms_driver, &pdev->dev);
    if (IS_ERR(dev))
        return PTR_ERR(dev);

    ret = pci_enable_device(pdev);
    if (ret)
        goto err_free;
```


So, there is no problem, as far as I can see.
All in all,  if the ->probe() failed, then the ->remove() will *NOT* get called.

--
Jingfeng




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux