linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] atm: eni: fix the missed pci_disable_device() for eni_init_one()
@ 2020-09-04  2:51 Jing Xiangfeng
  2020-09-05  4:45 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Jing Xiangfeng @ 2020-09-04  2:51 UTC (permalink / raw)
  To: 3chas3, davem; +Cc: linux-atm-general, netdev, linux-kernel, jingxiangfeng

eni_init_one() misses to call pci_disable_device() in an error path.
Jump to err_disable to fix it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 drivers/atm/eni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index 39be444534d0..316a9947541f 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -2224,7 +2224,7 @@ static int eni_init_one(struct pci_dev *pci_dev,
 
 	rc = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
 	if (rc < 0)
-		goto out;
+		goto err_disable;
 
 	rc = -ENOMEM;
 	eni_dev = kmalloc(sizeof(struct eni_dev), GFP_KERNEL);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] atm: eni: fix the missed pci_disable_device() for eni_init_one()
  2020-09-04  2:51 [PATCH] atm: eni: fix the missed pci_disable_device() for eni_init_one() Jing Xiangfeng
@ 2020-09-05  4:45 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-09-05  4:45 UTC (permalink / raw)
  To: Jing Xiangfeng; +Cc: 3chas3, davem, linux-atm-general, netdev, linux-kernel

On Fri, 4 Sep 2020 10:51:03 +0800 Jing Xiangfeng wrote:
> eni_init_one() misses to call pci_disable_device() in an error path.
> Jump to err_disable to fix it.
> 
> Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>

Please make sure you add appropriate fixes tags, here:

Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api")

Thank you.

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-05  4:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04  2:51 [PATCH] atm: eni: fix the missed pci_disable_device() for eni_init_one() Jing Xiangfeng
2020-09-05  4:45 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).