lkml.org 
[lkml]   [2023]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drm: Remove the deprecated drm_put_dev() function
From
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

\
 
 \ /
  Last update: 2023-06-27 16:16    [W:0.028 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site