{
struct clock_event_device *ced = &ch->ced;
- memset(ced, 0, sizeof(*ced));
-
ced->name = name;
ced->features = CLOCK_EVT_FEAT_PERIODIC;
ced->features |= CLOCK_EVT_FEAT_ONESHOT;
int irq;
int ret;
- memset(ch, 0, sizeof(*ch));
ch->cmt = cmt;
ch->base = cmt->mapbase_ch;
ch->index = index;
int ret;
ret = -ENXIO;
- memset(cmt, 0, sizeof(*cmt));
cmt->pdev = pdev;
if (!cfg) {
goto out;
}
- cmt = kmalloc(sizeof(*cmt), GFP_KERNEL);
+ cmt = kzalloc(sizeof(*cmt), GFP_KERNEL);
if (cmt == NULL) {
dev_err(&pdev->dev, "failed to allocate driver data\n");
return -ENOMEM;