Skip to contentSkip to conversation

p2pdma: remove redundant goto

PATCH Applied Tadeusz Struk 3 participants 3 messages Oct 23, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 p2pdma: remove redundant goto

Remove redundant goto in pci_alloc_p2pmem()

---
 drivers/pci/p2pdma.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/p2pdma.c +0 -1
index fa7370f9561a..a7776315996c 100644
@@ -837,7 +837,6 @@ void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
 	if (unlikely(!percpu_ref_tryget_live_rcu(ref))) {
 		gen_pool_free(p2pdma->pool, (unsigned long) ret, size);
 		ret = NULL;
-		goto out;
 	}
 out:
 	rcu_read_unlock();
Signature · 1 line
2.41.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Tadeusz Struk

Remove redundant goto in pci_alloc_p2pmem()

Makes sense to me.

Logan

Quoted 16 lines
---
 drivers/pci/p2pdma.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/p2pdma.c +0 -1
index fa7370f9561a..a7776315996c 100644
@@ -837,7 +837,6 @@ void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
 	if (unlikely(!percpu_ref_tryget_live_rcu(ref))) {
 		gen_pool_free(p2pdma->pool, (unsigned long) ret, size);
 		ret = NULL;
-		goto out;
 	}
 out:
 	rcu_read_unlock();
#2 lore raw
In reply to Tadeusz Struk
Quoted 3 lines · Tadeusz Struk

Remove redundant goto in pci_alloc_p2pmem()

Thanks, applied to pci/p2pdma with Logan's reviewed-by for v6.7.

Updated the subject line to:

PCI/P2PDMA: Remove redundant goto

so it matches the history.

Quoted 18 lines
---
 drivers/pci/p2pdma.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pci/p2pdma.c +0 -1
index fa7370f9561a..a7776315996c 100644
@@ -837,7 +837,6 @@ void *pci_alloc_p2pmem(struct pci_dev *pdev, size_t size)
 	if (unlikely(!percpu_ref_tryget_live_rcu(ref))) {
 		gen_pool_free(p2pdma->pool, (unsigned long) ret, size);
 		ret = NULL;
-		goto out;
 	}
 out:
 	rcu_read_unlock();
Signature · 1 line
2.41.0