relay: fix type mismatch when allocating memory in relay_create_buf()
[linux-block.git] / kernel / relay.c
index 0a3d2e702001a7b5df121c6e06d3384ea22914f1..ef12532168d9c57a0450a05fedf9bc3145b737a4 100644 (file)
@@ -148,13 +148,13 @@ static struct rchan_buf *relay_create_buf(struct rchan *chan)
 {
        struct rchan_buf *buf;
 
-       if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t *))
+       if (chan->n_subbufs > KMALLOC_MAX_SIZE / sizeof(size_t))
                return NULL;
 
        buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
        if (!buf)
                return NULL;
-       buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t *),
+       buf->padding = kmalloc_array(chan->n_subbufs, sizeof(size_t),
                                     GFP_KERNEL);
        if (!buf->padding)
                goto free_buf;