Skip to contentSkip to conversation

bus: mhi: ep: check the correct variable in mhi_ep_register_controller()

PATCH Applied Dan Carpenter 2 participants 3 messages Feb 21, 2024

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

PATCH 1/1 bus: mhi: ep: check the correct variable in mhi_ep_register_controller()

There is a copy and paste bug here so it checks "ev_ring_el_cache" instead of "ring_item_cache".

Fixes 62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable")
---
 drivers/bus/mhi/ep/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mhi/ep/main.c +1 -1
index 8d7a4102bdb7..f8f674adf1d4 100644
@@ -1497,7 +1497,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
 	mhi_cntrl->ring_item_cache = kmem_cache_create("mhi_ep_ring_item",
 							sizeof(struct mhi_ep_ring_item), 0,
 							0, NULL);
-	if (!mhi_cntrl->ev_ring_el_cache) {
+	if (!mhi_cntrl->ring_item_cache) {
 		ret = -ENOMEM;
 		goto err_destroy_tre_buf_cache;
 	}
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dan Carpenter

There is a copy and paste bug here so it checks "ev_ring_el_cache" instead of "ring_item_cache".

Fixes 62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable")

- Mani

Quoted 20 lines
---
 drivers/bus/mhi/ep/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mhi/ep/main.c +1 -1
index 8d7a4102bdb7..f8f674adf1d4 100644
@@ -1497,7 +1497,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
 	mhi_cntrl->ring_item_cache = kmem_cache_create("mhi_ep_ring_item",
 							sizeof(struct mhi_ep_ring_item), 0,
 							0, NULL);
-	if (!mhi_cntrl->ev_ring_el_cache) {
+	if (!mhi_cntrl->ring_item_cache) {
 		ret = -ENOMEM;
 		goto err_destroy_tre_buf_cache;
 	}
Signature · 1 line
2.43.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்
#2 lore raw
In reply to Dan Carpenter
Quoted 5 lines · Dan Carpenter

There is a copy and paste bug here so it checks "ev_ring_el_cache" instead of "ring_item_cache".

Fixes 62210a26cd4f ("bus: mhi: ep: Use slab allocator where applicable")

Applied to mhi-next!

- Mani

Quoted 20 lines
---
 drivers/bus/mhi/ep/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/mhi/ep/main.c +1 -1
index 8d7a4102bdb7..f8f674adf1d4 100644
@@ -1497,7 +1497,7 @@ int mhi_ep_register_controller(struct mhi_ep_cntrl *mhi_cntrl,
 	mhi_cntrl->ring_item_cache = kmem_cache_create("mhi_ep_ring_item",
 							sizeof(struct mhi_ep_ring_item), 0,
 							0, NULL);
-	if (!mhi_cntrl->ev_ring_el_cache) {
+	if (!mhi_cntrl->ring_item_cache) {
 		ret = -ENOMEM;
 		goto err_destroy_tre_buf_cache;
 	}
Signature · 1 line
2.43.0
Signature · 1 line
மணிவண்ணன் சதாசிவம்