Commit 1364fd09 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Greg Kroah-Hartman

wlcore: fix error handling in wlcore_event_fw_logger

commit 68f37e5d 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: 3719c17e ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0ffb73b
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
int wlcore_event_fw_logger(struct wl1271 *wl) int wlcore_event_fw_logger(struct wl1271 *wl)
{ {
u32 ret; int ret;
struct fw_logger_information fw_log; struct fw_logger_information fw_log;
u8 *buffer; u8 *buffer;
u32 internal_fw_addrbase = WL18XX_DATA_RAM_BASE_ADDRESS; u32 internal_fw_addrbase = WL18XX_DATA_RAM_BASE_ADDRESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment