[PATCH] mtd: bcm47xxpart: only register partitions if the trx header was filled
Brian Norris
computersforpeace at gmail.com
Wed Oct 22 02:05:17 PDT 2014
On Tue, Sep 23, 2014 at 02:27:59PM +0200, Rafał Miłecki wrote:
> 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.
Rewrapped and pushed to l2-mtd.git.
Brian
More information about the linux-mtd
mailing list