X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Farm%2Fmach-omap2%2Fomap_device.c;h=56d6814bec26a042b89afc3879b10680aa95f4d4;hb=95f05058b2bbe3b85c8617b961879e52f692caa5;hp=64b23b0cd23c7a33cd0e6ac7745d171aa11043c0;hpb=bac717171971176b78c72d15a8b6961764ab197f;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 64b23b0..56d6814 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c @@ -336,10 +336,9 @@ struct omap_device *omap_device_alloc(struct platform_device *pdev, struct omap_hwmod **hwmods; od = kzalloc(sizeof(struct omap_device), GFP_KERNEL); - if (!od) { - ret = -ENOMEM; + if (!od) goto oda_exit1; - } + od->hwmods_cnt = oh_cnt; hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL);