diff options
| -rw-r--r-- | drivers/mtd/ofpart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 64be8f0848b0..d9127e2ed808 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c | |||
| @@ -121,7 +121,7 @@ static int parse_ofoldpart_partitions(struct mtd_info *master, | |||
| 121 | nr_parts = plen / sizeof(part[0]); | 121 | nr_parts = plen / sizeof(part[0]); |
| 122 | 122 | ||
| 123 | *pparts = kzalloc(nr_parts * sizeof(*(*pparts)), GFP_KERNEL); | 123 | *pparts = kzalloc(nr_parts * sizeof(*(*pparts)), GFP_KERNEL); |
| 124 | if (!pparts) | 124 | if (!*pparts) |
| 125 | return -ENOMEM; | 125 | return -ENOMEM; |
| 126 | 126 | ||
| 127 | names = of_get_property(dp, "partition-names", &plen); | 127 | names = of_get_property(dp, "partition-names", &plen); |
