]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
bus: mhi: ep: check the correct variable in mhi_ep_register_controller()
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 21 Feb 2024 06:20:19 +0000 (09:20 +0300)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 21 Feb 2024 07:15:47 +0000 (12:45 +0530)
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 <dan.carpenter@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/bebcd822-d465-45da-adae-5435ec93e6d4@moroto.mountain
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/bus/mhi/ep/main.c

index 8d7a4102bdb7800fd8e36050f3508fc48c21ece4..f8f674adf1d4053d894c237aeae808b7a4977f3d 100644 (file)
@@ -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;
        }