]> git.karo-electronics.de Git - linux-beck.git/commit
UBI: simplify image sequence test
authorRichard Genoud <richard.genoud@gmail.com>
Sat, 28 Sep 2013 13:55:14 +0000 (15:55 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 3 Oct 2013 16:42:50 +0000 (19:42 +0300)
commit55b80c409a1368b8dff3c78943101bccb0ea3aa1
treea6cadd8f975bba008a5c05bd19c52411f36cf0e4
parentc22301ad4fa0f4cf71e9c877d072e6f07a0bf682
UBI: simplify image sequence test

The test:
if (!a && b)
  a = b;
can be symplified in:
if (!a)
  a = b;

And there's no need to test if ubi->image_seq is not null, because if it is,
it is set to image_seq.
So, we just test if image_seq is not null.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/ubi/attach.c