linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wlcore: fix error handling in wlcore_event_fw_logger
@ 2016-01-07 13:28 Andrzej Hajda
  2016-01-29  9:15 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Andrzej Hajda @ 2016-01-07 13:28 UTC (permalink / raw)
  To: Kalle Valo, Shahar Patury, open list:TI WILINK WIRELESS DRIVERS
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
	open list:NETWORKING DRIVERS, open list

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>
---
 drivers/net/wireless/ti/wlcore/event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wlcore/event.c b/drivers/net/wireless/ti/wlcore/event.c
index c964054..4b59f67 100644
--- 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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: wlcore: fix error handling in wlcore_event_fw_logger
  2016-01-07 13:28 [PATCH] wlcore: fix error handling in wlcore_event_fw_logger Andrzej Hajda
@ 2016-01-29  9:15 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-01-29  9:15 UTC (permalink / raw)
  To: Andrzej Hajda
  Cc: Shahar Patury, open list:TI WILINK WIRELESS DRIVERS,
	Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski,
	open list:NETWORKING DRIVERS, open list


> 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>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-29  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 13:28 [PATCH] wlcore: fix error handling in wlcore_event_fw_logger Andrzej Hajda
2016-01-29  9:15 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).