mei: samples: fix a signedness bug in amt_host_if_call()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 1 Oct 2018 16:44:41 +0000 (19:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:22:59 +0000 (08:22 +0100)
[ Upstream commit 185647813cac080453cb73a2e034a8821049f2a7 ]

"out_buf_sz" needs to be signed for the error handling to work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
samples/mei/mei-amt-version.c

index bb9988914a5637db435ac1026a108a5f3a62cb9a..32234481ad7dbee128cc9c31531b1843baf672b1 100644 (file)
@@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
                        unsigned int expected_sz)
 {
        uint32_t in_buf_sz;
-       uint32_t out_buf_sz;
+       ssize_t out_buf_sz;
        ssize_t written;
        uint32_t status;
        struct amt_host_if_resp_header *msg_hdr;