[PATCH] wlcore: fix error handling in wlcore_event_fw_logger

2016-01-07 Thread Andrzej Hajda
: 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio") Signed-off-by: Andrzej Hajda --- 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 10

[PATCH] NFC: nci: fix handling return value of nci_hci_create_pipe

2015-12-23 Thread Andrzej Hajda
The function return NCI_HCI_INVALID_PIPE in case of error. 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/2038576 Signed-off-by: Andrzej Hajda --- net/nfc/nci/hci.c

[PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate

2015-12-14 Thread Andrzej Hajda
-off-by: Andrzej Hajda --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index a680a97..fe1fd1a 100644 --- a/drivers/net/wireless/ath

[PATCH v2] NFC: fdp: fix handling return value of fdp_nci_create_conn

2015-12-10 Thread Andrzej Hajda
: Andrzej Hajda --- v2: fixed typo in goto instruction drivers/nfc/fdp/fdp.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c index ccb07a1..4dfd1ef 100644 --- a/drivers/nfc/fdp/fdp.c +++ b/drivers/nfc/fdp/fdp.c @@ -368,11

[PATCH] NFC: fdp: fix handling return value of fdp_nci_create_conn

2015-12-09 Thread Andrzej Hajda
: Andrzej Hajda --- drivers/nfc/fdp/fdp.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c index ccb07a1..440fac3 100644 --- a/drivers/nfc/fdp/fdp.c +++ b/drivers/nfc/fdp/fdp.c @@ -368,11 +368,10 @@ static int

[PATCH] NFC: fdp: fix handling return value of nci_conn_max_data_pkt_payload_size

2015-12-09 Thread Andrzej Hajda
: Andrzej Hajda --- drivers/nfc/fdp/fdp.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c index 440fac3..37a7134 100644 --- a/drivers/nfc/fdp/fdp.c +++ b/drivers/nfc/fdp/fdp.c @@ -192,7 +192,7 @@ static int fdp_nci_send_patch

[PATCH v2 18/19] mac80211: make ieee80211_new_mesh_header return unsigned

2015-09-24 Thread Andrzej Hajda
The function returns always non-negative values. 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 --- v2: added missing declaration

[PATCH 18/19] mac80211: make ieee80211_new_mesh_header return unsigned

2015-09-24 Thread Andrzej Hajda
The function returns always non-negative values. 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 --- Hi, To avoid problems with too

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Andrzej Hajda
On 09/21/2015 03:42 PM, David Howells wrote: > Andrzej Hajda wrote: > >> Semantic patch finds comparisons of types: >> unsigned < 0 >> unsigned >= 0 >> The former is always false, the latter is always true. >> Such comparisons are useless, so the

[PATCH 20/38] net: brcm80211: fix range check

2015-09-21 Thread Andrzej Hajda
Unsigned minus constant is still unsigned so checking its sign makes no sense. 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/2038576 Signed-off-by: Andrzej Hajda

[PATCH 23/38] rndis_wlan: fix checking for default value

2015-09-21 Thread Andrzej Hajda
/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- drivers/net/wireless/rndis_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 71a825c..a13d1f2 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b

[PATCH 21/38] mwifiex: fix comparison expression

2015-09-21 Thread Andrzej Hajda
To avoid underflows signed variables should be used in expression. 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/2038576 Signed-off-by: Andrzej Hajda --- drivers/net

[PATCH 22/38] orinoco: fix checking for default value

2015-09-21 Thread Andrzej Hajda
/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- drivers/net/wireless/orinoco/cfg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c index a9e94b6..0f6ea31 100644 --- a/drivers/net/wireless/orinoco/cfg.c