From: Punit Vara <punitvara@gmail.com>
To: gregkh@linuxfoundation.org
Cc: johnny.kim@atmel.com, rachel.kim@atmel.com, chris.park@atmel.com,
tony.cho@atmel.com, glen.lee@atmel.com, leo.kim@atmel.com,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org, Punit Vara <punitvara@gmail.com>
Subject: [PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL
Date: Sun, 25 Oct 2015 04:01:24 +0530 [thread overview]
Message-ID: <1445725885-25995-3-git-send-email-punitvara@gmail.com> (raw)
In-Reply-To: <1445725885-25995-1-git-send-email-punitvara@gmail.com>
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
next prev parent reply other threads:[~2015-10-24 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-24 22:31 [PATCH 0/3] Staging: wilc1000: Remove coccicheck warnings and error Punit Vara
2015-10-24 22:31 ` [PATCH 1/3] staging: wilc1000: Remove reference preceded by free Punit Vara
2015-10-25 19:12 ` Greg KH
2015-10-25 19:31 ` punit vara
2015-10-25 19:59 ` punit vara
2015-10-25 21:32 ` Greg KH
2015-10-24 22:31 ` Punit Vara [this message]
2015-10-25 19:12 ` [PATCH 2/3] Staging: wilc1000: Remove comparision of field address to NULL Greg KH
2015-10-24 22:31 ` [PATCH 3/3] Staging: wilc1000: Remove boolean comparision Punit Vara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445725885-25995-3-git-send-email-punitvara@gmail.com \
--to=punitvara@gmail.com \
--cc=chris.park@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=glen.lee@atmel.com \
--cc=gregkh@linuxfoundation.org \
--cc=johnny.kim@atmel.com \
--cc=leo.kim@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rachel.kim@atmel.com \
--cc=tony.cho@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.