staging: wilc1000: fixes a struct allocation to match coding standards
authorLeo Kim <leo.kim@atmel.com>
Fri, 6 Nov 2015 02:13:04 +0000 (11:13 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
This patch fixes the checks reported by checkpatch.pl
for prefer kmalloc(sizeof(*rqe)...) over kmalloc(sizeof(struct rxq_entry_t)...)

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wlan.c

index f1bb8affec5b48f12d4dea7ac19b6385a03cae3a..c4118fedfb7008811707ea276dfb237ba1557713 100644 (file)
@@ -1132,7 +1132,7 @@ _end_:
                        offset += size;
                        p->rx_buffer_offset = offset;
 #endif
-                       rqe = kmalloc(sizeof(struct rxq_entry_t), GFP_KERNEL);
+                       rqe = kmalloc(sizeof(*rqe), GFP_KERNEL);
                        if (rqe) {
                                rqe->buffer = buffer;
                                rqe->buffer_size = size;