aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/omap_sdrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/omap_sdrc.c')
-rw-r--r--hw/misc/omap_sdrc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/misc/omap_sdrc.c b/hw/misc/omap_sdrc.c
index 3de0c0e9d0..bca25307b5 100644
--- a/hw/misc/omap_sdrc.c
+++ b/hw/misc/omap_sdrc.c
@@ -157,8 +157,7 @@ static const MemoryRegionOps omap_sdrc_ops = {
struct omap_sdrc_s *omap_sdrc_init(MemoryRegion *sysmem,
hwaddr base)
{
- struct omap_sdrc_s *s = (struct omap_sdrc_s *)
- g_malloc0(sizeof(struct omap_sdrc_s));
+ struct omap_sdrc_s *s = g_new0(struct omap_sdrc_s, 1);
omap_sdrc_reset(s);