Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dd7fdb1 authored by Jörn Engel's avatar Jörn Engel Committed by David Woodhouse
Browse files

[RSLIB] BUG() when passing illegal parameters to decode_rs8() or decode_rs16()



Returning -ERANGE should never happen.

Signed-off-by: default avatarJörn Engel <joern@logfs.org>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent c32b8dcc
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -39,8 +39,7 @@

	/* Check length parameter for validity */
	pad = nn - nroots - len;
	if (pad < 0 || pad >= nn)
		return -ERANGE;
	BUG_ON(pad < 0 || pad >= nn);

	/* Does the caller provide the syndrome ? */
	if (s != NULL)