if ((sc_dec & (16 << i)) == 0)
continue;
- lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL);
+ lmdev = kmalloc(sizeof(struct lm_device), GFP_KERNEL);
if (!lmdev)
continue;
+ memset(lmdev, 0, sizeof(struct lm_device));
+
lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
lmdev->resource.flags = IORESOURCE_MEM;