Skip to content

Commit

Permalink
wlcore: fix error handling in wlcore_event_fw_logger
Browse files Browse the repository at this point in the history
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: 3719c17 ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Andrzej Hajda authored and Kalle Valo committed Jan 29, 2016
1 parent 17934b6 commit 68f37e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 68f37e5

Please sign in to comment.