drivers/can/mcp2515.c: Use kmm_zalloc to allocate device state structure.

This commit is contained in:
Valmantas Paliksa 2019-03-20 06:33:23 -06:00 committed by Gregory Nutt
parent d09dc74488
commit 527317b6ca
1 changed files with 1 additions and 1 deletions

View File

@ -2570,7 +2570,7 @@ FAR struct can_dev_s *mcp2515_initialize(FAR struct mcp2515_can_s *mcp2515can)
/* Allocate a CAN Device structure */
dev = (FAR struct can_dev_s *)kmm_malloc(sizeof(struct can_dev_s));
dev = (FAR struct can_dev_s *)kmm_zalloc(sizeof(struct can_dev_s));
if (dev == NULL)
{
canerr("ERROR: Failed to allocate instance of can_dev_s!\n");