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


Groups > linux.kernel > #1396707 > unrolled thread

[PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-05-09 09:30 +0200
Last post2016-05-09 09:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-05-09 09:30 +0200

#1396707 — [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-05-09 09:30 +0200
Subject[PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger
Message-ID<rwNNH-7J-87@gated-at.bofh.it>
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Andrzej Hajda <a.hajda@samsung.com>

commit 68f37e5d7a2e00306adab033fba6c3042b33e8e1 upstream.

wlcore_read/wlcore_write can return negative values so it should
be assigned to signed variable.

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

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

Fixes: 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ti/wlcore/event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -38,7 +38,7 @@
 
 int wlcore_event_fw_logger(struct wl1271 *wl)
 {
-	u32 ret;
+	int ret;
 	struct fw_logger_information fw_log;
 	u8  *buffer;
 	u32 internal_fw_addrbase = WL18XX_DATA_RAM_BASE_ADDRESS;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web