]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/lru_cache.c
HID: add support for HuiJia USB Gamepad connector
[karo-tx-linux.git] / lib / lru_cache.c
index 270de9d31b8c1a04940489e6bdd60b06480179b2..a07e7268d7ed4aa446f590076fed5a86aab96877 100644 (file)
@@ -84,7 +84,7 @@ struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
        if (e_count > LC_MAX_ACTIVE)
                return NULL;
 
-       slot = kzalloc(e_count * sizeof(struct hlist_head*), GFP_KERNEL);
+       slot = kcalloc(e_count, sizeof(struct hlist_head), GFP_KERNEL);
        if (!slot)
                goto out_fail;
        element = kzalloc(e_count * sizeof(struct lc_element *), GFP_KERNEL);