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