Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1291035

[PATCH] doc: mei: fix handling return value of mei_recv_msg

From Andrzej Hajda <a.hajda@samsung.com>
Newsgroups linux.kernel
Subject [PATCH] doc: mei: fix handling return value of mei_recv_msg
Date 2015-12-14 11:10 +0100
Message-ID <qFyeU-4Fp-19@gated-at.bofh.it> (permalink)
References <qFyeT-4Fp-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The function can return negative values, so its result should
be assigned to signed variable.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 Documentation/misc-devices/mei/mei-amt-version.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c
index 57d0d87..33e67bd 100644
--- a/Documentation/misc-devices/mei/mei-amt-version.c
+++ b/Documentation/misc-devices/mei/mei-amt-version.c
@@ -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;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net/mlx4_core: fix handling return value of  mlx4_slave_convert_port Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
  [PATCH] extcon: max14577: fix handling return value of  regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
    Re: [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-14 11:40 +0100
      [PATCH] extcon: max77693: fix handling return value of  regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 12:20 +0100
        Re: [PATCH] extcon: max77693: fix handling return value of  regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-15 01:30 +0100
        Re: [PATCH] extcon: max77693: fix handling return value of  regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
    Re: [PATCH] extcon: max14577: fix handling return value of  regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
  [PATCH] clk: sunxi: fix handling return value of  of_property_match_string Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
    Re: [PATCH] clk: sunxi: fix handling return value of  of_property_match_string Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-12-14 14:10 +0100
  [PATCH] doc: mei: fix handling return value of mei_recv_msg Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
    RE: [PATCH] doc: mei: fix handling return value of mei_recv_msg "Winkler, Tomas" <tomas.winkler@intel.com> - 2015-12-14 13:10 +0100
  [PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
    Re: [PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate Kalle Valo <kvalo@codeaurora.org> - 2015-12-31 14:20 +0100
  [PATCH] be2iscsi: fix handling return value of mgmt_open_connection Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
  [PATCH] extcon: max77843: fix handling return value of  regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
    Re: [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-14 11:40 +0100
    Re: [PATCH] extcon: max77843: fix handling return value of  regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
  Re: [PATCH] net/mlx4_core: fix handling return value of  mlx4_slave_convert_port David Miller <davem@davemloft.net> - 2015-12-15 18:00 +0100

csiph-web