lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mtd: rawnand: denali: Fix a possible resource leak in denali_pci_probe
Hi,

christophe.jaillet@wanadoo.fr wrote on Mon, 1 Aug 2022 20:26:07 +0200:

> Le 01/08/2022 à 10:03, GONG, Ruiqi a écrit :
> > Call pci_release_regions() to retrieve the allocated resource when
> > devm_ioremap() or denali_init() failed.
> >
>
> Hi,
> this is not correct.
>
> First, should you be right, you should also update the .remove() function the same way.
>
> Second, at the beginning there is pcim_enable_device() call.
> This looked like magic to me when I first saw it, but this function makes some pci_ functions work just as it they were pcim_ functions.
>
> See pcim_enable_device() ([1]), at line 2132.
> When pcim_release() ([2]) is called by the framework, then regions are released at line 2079

Interesting, I just see this answer now, please ignore my first comment
then, it's not useful.

Thanks Christophe for the feedback.

Cheers,
Miquèl

\
 
 \ /
  Last update: 2022-09-19 17:35    [W:0.076 / U:0.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site