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

Commit 881f76b9 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman
Browse files

staging: ks7010: change length type to unsigned



Length undergoes type conversion when passed (indirectly) as an
argument for parameter of type 'unsigned int'. If length is negative
this is a bug (the value after conversion is large).

Declare 'length' to be an unsigned type instead of a signed type.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5141e9c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -712,7 +712,7 @@ static int ks7010_upload_firmware(struct ks_sdio_card *card)
	unsigned char *rom_buf;
	unsigned char rw_data = 0;
	int ret;
	int length;
	unsigned int length;
	const struct firmware *fw_entry = NULL;

	/* buffer allocate */