treewide: Use array_size() in vmalloc()
[linux-2.6-block.git] / drivers / md / bcache / sysfs.c
index 8ccbc8f3b3af7ff805398fe3ea7ff719f46ec20f..225b15aa03405464726ffcde0620e0a0c40e959f 100644 (file)
@@ -881,7 +881,8 @@ SHOW(__bch_cache)
                uint16_t q[31], *p, *cached;
                ssize_t ret;
 
-               cached = p = vmalloc(ca->sb.nbuckets * sizeof(uint16_t));
+               cached = p = vmalloc(array_size(sizeof(uint16_t),
+                                               ca->sb.nbuckets));
                if (!p)
                        return -ENOMEM;