aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ucb1x00-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/ucb1x00-core.c')
-rw-r--r--drivers/mfd/ucb1x00-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 149810a084f5..e03f1bcd4f9f 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -484,12 +484,11 @@ static int ucb1x00_probe(struct mcp *mcp)
484 goto err_disable; 484 goto err_disable;
485 } 485 }
486 486
487 ucb = kmalloc(sizeof(struct ucb1x00), GFP_KERNEL); 487 ucb = kzalloc(sizeof(struct ucb1x00), GFP_KERNEL);
488 ret = -ENOMEM; 488 ret = -ENOMEM;
489 if (!ucb) 489 if (!ucb)
490 goto err_disable; 490 goto err_disable;
491 491
492 memset(ucb, 0, sizeof(struct ucb1x00));
493 492
494 ucb->cdev.class = &ucb1x00_class; 493 ucb->cdev.class = &ucb1x00_class;
495 ucb->cdev.dev = &mcp->attached_device; 494 ucb->cdev.dev = &mcp->attached_device;