drivers/can/mcp2515.c: Use kmm_zalloc to allocate device state structure.
This commit is contained in:
parent
d09dc74488
commit
527317b6ca
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue