* [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe
@ 2020-08-23 6:55 Dinghao Liu
2020-08-24 14:37 ` Dave Jiang
0 siblings, 1 reply; 3+ messages in thread
From: Dinghao Liu @ 2020-08-23 6:55 UTC (permalink / raw)
To: dinghao.liu, kjlu
Cc: Dave Jiang, Jon Mason, Allen Hubbe, linux-ntb, linux-kernel
The default error branch of a series of pdev_is_gen calls
should free ndev just like what we've done in these calls.
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c
index 3185efeab487..093dd20057b9 100644
--- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
+++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
@@ -1893,7 +1893,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev,
goto err_init_dev;
} else {
rc = -EINVAL;
- goto err_ndev;
+ goto err_init_pci;
}
ndev_reset_unsafe_flags(ndev);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe
2020-08-23 6:55 [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe Dinghao Liu
@ 2020-08-24 14:37 ` Dave Jiang
2020-08-24 14:48 ` Jon Mason
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2020-08-24 14:37 UTC (permalink / raw)
To: Dinghao Liu, kjlu; +Cc: Jon Mason, Allen Hubbe, linux-ntb, linux-kernel
On 8/22/2020 11:55 PM, Dinghao Liu wrote:
> The default error branch of a series of pdev_is_gen calls
> should free ndev just like what we've done in these calls.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Thanks Dinghao
Acked-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> index 3185efeab487..093dd20057b9 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> @@ -1893,7 +1893,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev,
> goto err_init_dev;
> } else {
> rc = -EINVAL;
> - goto err_ndev;
> + goto err_init_pci;
> }
>
> ndev_reset_unsafe_flags(ndev);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe
2020-08-24 14:37 ` Dave Jiang
@ 2020-08-24 14:48 ` Jon Mason
0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2020-08-24 14:48 UTC (permalink / raw)
To: Dave Jiang; +Cc: Dinghao Liu, kjlu, Allen Hubbe, linux-ntb, linux-kernel
On Mon, Aug 24, 2020 at 07:37:56AM -0700, Dave Jiang wrote:
>
>
> On 8/22/2020 11:55 PM, Dinghao Liu wrote:
> > The default error branch of a series of pdev_is_gen calls
> > should free ndev just like what we've done in these calls.
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
>
> Thanks Dinghao
> Acked-by: Dave Jiang <dave.jiang@intel.com>
Added to my ntb branch.
I added
Fixes: 26bfe3d0b227 ("ntb: intel: Add Icelake (gen4) support for Intel NTB")
Thanks,
Jon
>
> > ---
> > drivers/ntb/hw/intel/ntb_hw_gen1.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/ntb/hw/intel/ntb_hw_gen1.c b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> > index 3185efeab487..093dd20057b9 100644
> > --- a/drivers/ntb/hw/intel/ntb_hw_gen1.c
> > +++ b/drivers/ntb/hw/intel/ntb_hw_gen1.c
> > @@ -1893,7 +1893,7 @@ static int intel_ntb_pci_probe(struct pci_dev *pdev,
> > goto err_init_dev;
> > } else {
> > rc = -EINVAL;
> > - goto err_ndev;
> > + goto err_init_pci;
> > }
> > ndev_reset_unsafe_flags(ndev);
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-24 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-23 6:55 [PATCH] ntb: intel: Fix memleak in intel_ntb_pci_probe Dinghao Liu
2020-08-24 14:37 ` Dave Jiang
2020-08-24 14:48 ` Jon Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox