From a2efef85ba1d995163ba5864c3095a3ed6727f72 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 12 Feb 2010 08:48:35 -0800 Subject: [PATCH] --- yaml --- r: 180530 b: refs/heads/master c: 280c96b16a732cec207ccef7f70cb9ec727d3fd9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/mmc-twl4030.c | 7 ++++++- trunk/fs/gfs2/bmap.c | 2 +- trunk/fs/gfs2/ops_fstype.c | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index bc948dc2128a..f24f45cdc026 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62737d445b149eaf0beac50de8d856b5e94150be +refs/heads/master: 280c96b16a732cec207ccef7f70cb9ec727d3fd9 diff --git a/trunk/arch/arm/mach-omap2/mmc-twl4030.c b/trunk/arch/arm/mach-omap2/mmc-twl4030.c index 0c3c72d934bf..8afe9dd3f150 100644 --- a/trunk/arch/arm/mach-omap2/mmc-twl4030.c +++ b/trunk/arch/arm/mach-omap2/mmc-twl4030.c @@ -408,6 +408,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) { struct twl4030_hsmmc_info *c; int nr_hsmmc = ARRAY_SIZE(hsmmc_data); + int i; if (cpu_is_omap2430()) { control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; @@ -434,7 +435,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); if (!mmc) { pr_err("Cannot allocate memory for mmc device!\n"); - return; + goto done; } if (c->name) @@ -532,6 +533,10 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) continue; c->dev = mmc->dev; } + +done: + for (i = 0; i < nr_hsmmc; i++) + kfree(hsmmc_data[i]); } #endif diff --git a/trunk/fs/gfs2/bmap.c b/trunk/fs/gfs2/bmap.c index 6d47379e794b..583e823307ae 100644 --- a/trunk/fs/gfs2/bmap.c +++ b/trunk/fs/gfs2/bmap.c @@ -541,7 +541,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock, *ptr++ = cpu_to_be64(bn++); break; } - } while (state != ALLOC_DATA); + } while ((state != ALLOC_DATA) || !dblock); ip->i_height = height; gfs2_add_inode_blocks(&ip->i_inode, alloced); diff --git a/trunk/fs/gfs2/ops_fstype.c b/trunk/fs/gfs2/ops_fstype.c index 8a102f731003..a86ed6381566 100644 --- a/trunk/fs/gfs2/ops_fstype.c +++ b/trunk/fs/gfs2/ops_fstype.c @@ -725,7 +725,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) goto fail; } - error = -EINVAL; + error = -EUSERS; if (!gfs2_jindex_size(sdp)) { fs_err(sdp, "no journals!\n"); goto fail_jindex;