Messages in this thread | | | Date | Tue, 27 Jun 2023 22:15:11 +0800 | Subject | Re: [PATCH] drm: Remove the deprecated drm_put_dev() function | From | Sui Jingfeng <> |
| |
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
| |