Re: [PATCH 09/10] pci: devres: remove legacy pcim_release()

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

 



On Tue, 2024-01-16 at 23:40 +0200, andy.shevchenko@xxxxxxxxx wrote:
> Mon, Jan 15, 2024 at 03:46:20PM +0100, Philipp Stanner kirjoitti:
> > Thanks to preceding cleanup steps, pcim_release() is now not needed
> > anymore and can be replaced by pcim_disable_device(), which is the
> > exact
> > counterpart to pcim_enable_device().
> > This permits removing further parts of the old devres API.
> > 
> > Replace pcim_release() with pcim_disable_device().
> > Remove the now surplus get_dr() function.
> 
> ...
> 
> > +       devm_add_action(&pdev->dev, pcim_disable_device, pdev);
> 
> No error check?
> 
> > +       return pci_enable_device(pdev);
> 
> Maybe
> 
>         ret = pci_enable_device(...);
>         if (ret)
>                 return ret;
> 
>         return devm_add_action_or_reset(...)?
> 
> I could think of side effects of this, so perhaps the commit message
> and/or
> code needs a comment on why the above proposal can _not_ be used?
> 

That proposal can be used, so this was simply a bug.

P.





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux