[PATCH] mtd: bcm47xxpart: only register partitions if the trx header was filled

Rafał Miłecki zajec5 at gmail.com
Tue Sep 23 05:27:59 PDT 2014


On 22 September 2014 00:33, Hauke Mehrtens <hauke at hauke-m.de> wrote:
> diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c
> index 8057f52..c3f4454 100644
> --- a/drivers/mtd/bcm47xxpart.c
> +++ b/drivers/mtd/bcm47xxpart.c
> @@ -168,18 +168,22 @@ static int bcm47xxpart_parse(struct mtd_info *master,
>                                 i++;
>                         }
>
> -                       bcm47xxpart_add_part(&parts[curr_part++], "linux",
> -                                            offset + trx->offset[i], 0);
> -                       i++;
> +                       if (trx->offset[i]) {
> +                               bcm47xxpart_add_part(&parts[curr_part++], "linux",
> +                                                    offset + trx->offset[i], 0);

You may at least move "linux" to the next line to don't exceed 80
chars limit. Same for "rootfs" below.

-- 
Rafał



More information about the linux-mtd mailing list