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