diff mbox

UBI: Fastmap request for inclusion (v19)

Message ID 506BFF58.4060106@nod.at
State New, archived
Headers show

Commit Message

Richard Weinberger Oct. 3, 2012, 9:03 a.m. UTC
On 03.10.2012 10:44, Artem Bityutskiy wrote:
> On Wed, 2012-10-03 at 10:36 +0200, Richard Weinberger wrote:
>> Am Wed, 03 Oct 2012 11:25:45 +0300
>> schrieb Artem Bityutskiy <artem.bityutskiy@linux.intel.com>:
>>
>>> On Wed, 2012-09-26 at 17:51 +0200, Richard Weinberger wrote:
>>>> UBI Fastmap is an optional feature which stores the physical to
>>>> logical eraseblock relations in a checkpoint (called fastmap) to
>>>> reduce the initialization time of UBI. The current init time of UBI
>>>> is proportional to the number of physical erase blocks on the FLASH
>>>> device. With fastmap enabled the scan time is limited to a fixed
>>>> number of blocks.
>>>
>>> Aiaiai complains and linux-next build fails :-( Last time I forgot to
>>> enable the fastmap kbuild option so aiaiai checked with that option
>>> disabled. Now I enabled it with a simple hack (default n -> default y)
>>> and here are aiaiai's complaints - there is a build failure for
>>> ARCH=i386.
>>
>> Build fix for linux-next is on the way into your inbox.
>> I'm currently looking at the aiaiai output.
>
> OK, I see, goto out is missing after line 919. Please, send a short fix
> - I'll squash it in. But general error-path rework is needed for this
> function, may be separately.
>

Yeah, it looks like all issues reported by aiaiai are caused by the missing goto.
Can you deal with the patch below or do you want me to send it using git send-email?

Thanks,
//richard

---

Comments

Artem Bityutskiy Oct. 3, 2012, 9:30 a.m. UTC | #1
On Wed, 2012-10-03 at 11:03 +0200, Richard Weinberger wrote:
> Yeah, it looks like all issues reported by aiaiai are caused by the missing goto.
> Can you deal with the patch below or do you want me to send it using git send-email?

I'll apply it. But please, re-work the error handling in that function
separately.
Richard Weinberger Oct. 3, 2012, 9:32 a.m. UTC | #2
On 03.10.2012 11:30, Artem Bityutskiy wrote:
> On Wed, 2012-10-03 at 11:03 +0200, Richard Weinberger wrote:
>> Yeah, it looks like all issues reported by aiaiai are caused by the missing goto.
>> Can you deal with the patch below or do you want me to send it using git send-email?
>
> I'll apply it. But please, re-work the error handling in that function
> separately.
>

Okay, but not now during the merge window.
Is this fine for you?

Thanks,
//richard
diff mbox

Patch

diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index be73a1d..adcb2e4 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -917,6 +917,7 @@  int ubi_scan_fastmap(struct ubi_device *ubi, struct ubi_attach_info *ai,
  		ret = UBI_BAD_FASTMAP;
  		kfree(fmsb);
  		kfree(fm);
+		goto out;
  	}

  	ech = kzalloc(ubi->ec_hdr_alsize, GFP_KERNEL);