Commit 89d6e45c authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: sp887x: fix a warning



drivers/media/dvb-frontends/sp887x.c:179 sp887x_initial_setup() error: memcpy() '&buf[2]' too small (30 vs 16384)

This is actually a false alarm, but reverting the check order
makes not only for humans to review the code, but also cleans
the warning.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 912d2f82
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware
		int c = BLOCKSIZE;
		int err;

		if (i+c > FW_SIZE)
		if (c > FW_SIZE - i)
			c = FW_SIZE - i;

		/* bit 0x8000 in address is set to enable 13bit mode */