2024-02-21 06:21:30

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] 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")
Signed-off-by: Dan Carpenter <[email protected]>
---
drivers/bus/mhi/ep/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
index 8d7a4102bdb7..f8f674adf1d4 100644
--- a/drivers/bus/mhi/ep/main.c
+++ b/drivers/bus/mhi/ep/main.c
@@ -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;
}
--
2.43.0



2024-02-21 07:08:01

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH] bus: mhi: ep: check the correct variable in mhi_ep_register_controller()

On Wed, Feb 21, 2024 at 09:20:19AM +0300, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <[email protected]>

Reviewed-by: Manivannan Sadhasivam <[email protected]>

- Mani

> ---
> drivers/bus/mhi/ep/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
> index 8d7a4102bdb7..f8f674adf1d4 100644
> --- a/drivers/bus/mhi/ep/main.c
> +++ b/drivers/bus/mhi/ep/main.c
> @@ -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;
> }
> --
> 2.43.0
>

--
மணிவண்ணன் சதாசிவம்

2024-02-21 07:16:24

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH] bus: mhi: ep: check the correct variable in mhi_ep_register_controller()

On Wed, Feb 21, 2024 at 09:20:19AM +0300, Dan Carpenter wrote:
> 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")
> Signed-off-by: Dan Carpenter <[email protected]>

Applied to mhi-next!

- Mani

> ---
> drivers/bus/mhi/ep/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c
> index 8d7a4102bdb7..f8f674adf1d4 100644
> --- a/drivers/bus/mhi/ep/main.c
> +++ b/drivers/bus/mhi/ep/main.c
> @@ -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;
> }
> --
> 2.43.0
>

--
மணிவண்ணன் சதாசிவம்