summaryrefslogtreecommitdiff
path: root/drivers/tty/moxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r--drivers/tty/moxa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 1bb2376af85c..40a1c614e23b 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -954,8 +954,7 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev)
unsigned int i, first_idx;
int ret;
- brd->ports = kcalloc(MAX_PORTS_PER_BOARD, sizeof(*brd->ports),
- GFP_KERNEL);
+ brd->ports = kzalloc_objs(*brd->ports, MAX_PORTS_PER_BOARD);
if (brd->ports == NULL) {
printk(KERN_ERR "cannot allocate memory for ports\n");
ret = -ENOMEM;