Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
OMAP: hsmmc: fix memory leak

+6 -1
+6 -1
arch/arm/mach-omap2/mmc-twl4030.c
··· 408 408 { 409 409 struct twl4030_hsmmc_info *c; 410 410 int nr_hsmmc = ARRAY_SIZE(hsmmc_data); 411 + int i; 411 412 412 413 if (cpu_is_omap2430()) { 413 414 control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; ··· 435 434 mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); 436 435 if (!mmc) { 437 436 pr_err("Cannot allocate memory for mmc device!\n"); 438 - return; 437 + goto done; 439 438 } 440 439 441 440 if (c->name) ··· 533 532 continue; 534 533 c->dev = mmc->dev; 535 534 } 535 + 536 + done: 537 + for (i = 0; i < nr_hsmmc; i++) 538 + kfree(hsmmc_data[i]); 536 539 } 537 540 538 541 #endif