Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255261
| From | Punit Vara <punitvara@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL |
| Date | 2015-10-25 00:40 +0200 |
| Message-ID | <qnfDH-5tK-3@gated-at.bofh.it> (permalink) |
| References | <qnfDH-5tK-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This is patch to the linux_wlan file that fixes up following error
reported by coccicheck :
ERROR: test of a variable/field address
Signed-off-by: Punit Vara <punitvara@gmail.com>
---
drivers/staging/wilc1000/linux_wlan.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index b879b8b..1b0f89c 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -907,7 +907,7 @@ void wilc1000_wlan_deinit(struct wilc *nic)
disable_sdio_interrupt();
mutex_unlock(&g_linux_wlan->hif_cs);
#endif
- if (&g_linux_wlan->txq_event != NULL)
+ if (!(&g_linux_wlan->txq_event))
up(&g_linux_wlan->txq_event);
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
@@ -969,10 +969,10 @@ static int wlan_deinit_locks(struct wilc *nic)
{
PRINT_D(INIT_DBG, "De-Initializing Locks\n");
- if (&g_linux_wlan->hif_cs != NULL)
+ if (!(&g_linux_wlan->hif_cs))
mutex_destroy(&g_linux_wlan->hif_cs);
- if (&g_linux_wlan->rxq_cs != NULL)
+ if (!(&g_linux_wlan->rxq_cs))
mutex_destroy(&g_linux_wlan->rxq_cs);
return 0;
@@ -1037,7 +1037,7 @@ static void wlan_deinitialize_threads(struct wilc *nic)
g_linux_wlan->close = 1;
PRINT_D(INIT_DBG, "Deinitializing Threads\n");
- if (&g_linux_wlan->txq_event != NULL)
+ if (!(&g_linux_wlan->txq_event))
up(&g_linux_wlan->txq_event);
if (g_linux_wlan->txq_thread != NULL) {
--
2.5.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] Staging: wilc1000: Remove coccicheck warnings and error Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
[PATCH 3/3] Staging: wilc1000: Remove boolean comparision Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
[PATCH 1/3] staging: wilc1000: Remove reference preceded by free Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 20:20 +0100
Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free punit vara <punitvara@gmail.com> - 2015-10-25 20:40 +0100
Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free punit vara <punitvara@gmail.com> - 2015-10-25 21:00 +0100
Re: [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 22:40 +0100
[PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL Punit Vara <punitvara@gmail.com> - 2015-10-25 00:40 +0200
Re: [PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL Greg KH <gregkh@linuxfoundation.org> - 2015-10-25 20:20 +0100
csiph-web