From c29e25b7e27bb3222a6b441aeda6bb58143768d9 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 14 Apr 2008 17:20:04 +0300 Subject: [PATCH] --- yaml --- r: 93023 b: refs/heads/master c: ed262c4f5cb8291668c27c88a022bd7628f067a4 h: refs/heads/master i: 93021: 09db7fee6b81a939986e24d0ead6c828d2764b70 93019: 2615885bcaa4e8168d247331cad7e2f67368ccff 93015: eec3f25bccf6769f68d8c285d761129a9f6ef068 93007: b5b8eda9c6f13cbffbbfe69bd41ce38e348cb6b0 92991: 24cbfcf127b0f221af1836f8d73596322241f25c v: v3 --- [refs] | 2 +- trunk/drivers/mtd/cmdlinepart.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index e0a4dc2fa720..942e9e0a1fdc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 456d9fc92eb8635d53e8facc57764464b8759173 +refs/heads/master: ed262c4f5cb8291668c27c88a022bd7628f067a4 diff --git a/trunk/drivers/mtd/cmdlinepart.c b/trunk/drivers/mtd/cmdlinepart.c index b44292abd9f7..3e090436396d 100644 --- a/trunk/drivers/mtd/cmdlinepart.c +++ b/trunk/drivers/mtd/cmdlinepart.c @@ -119,7 +119,8 @@ static struct mtd_partition * newpart(char *s, char *p; name = ++s; - if ((p = strchr(name, delim)) == 0) + p = strchr(name, delim); + if (!p) { printk(KERN_ERR ERRP "no closing %c found in partition name\n", delim); return NULL; @@ -159,9 +160,10 @@ static struct mtd_partition * newpart(char *s, return NULL; } /* more partitions follow, parse them */ - if ((parts = newpart(s + 1, &s, num_parts, - this_part + 1, &extra_mem, extra_mem_size)) == 0) - return NULL; + parts = newpart(s + 1, &s, num_parts, this_part + 1, + &extra_mem, extra_mem_size); + if (!parts) + return NULL; } else { /* this is the last partition: allocate space for all */