From: Yogesh Hegde <yogi.kernel@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8192e: Fix comparison to NULL of variable rf_set_sens
Date: Sun, 9 Apr 2023 18:40:42 +0530 [thread overview]
Message-ID: <ZDK5UvVHa96ejEfU@Zephyrus-G14> (raw)
Fix comparision to NULL of variable rf_set_sens as per Linux kernel
coding-style. These issues were reported by checkpatch.pl.
CHECK: Comparison to NULL could be written "priv->rf_set_sens"
CHECK: Comparison to NULL could be written "!priv->rf_set_sens"
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index cb28288a618b..a67edb81a820 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -311,7 +311,7 @@ static int _rtl92e_wx_get_range(struct net_device *dev,
/* ~130 Mb/s real (802.11n) */
range->throughput = 130 * 1000 * 1000;
- if (priv->rf_set_sens != NULL)
+ if (priv->rf_set_sens)
/* signal level threshold range */
range->sensitivity = priv->max_sens;
@@ -813,7 +813,7 @@ static int _rtl92e_wx_get_sens(struct net_device *dev,
{
struct r8192_priv *priv = rtllib_priv(dev);
- if (priv->rf_set_sens == NULL)
+ if (!priv->rf_set_sens)
return -1; /* we have not this support for this radio */
wrqu->sens.value = priv->sens;
return 0;
@@ -831,7 +831,7 @@ static int _rtl92e_wx_set_sens(struct net_device *dev,
return 0;
mutex_lock(&priv->wx_mutex);
- if (priv->rf_set_sens == NULL) {
+ if (!priv->rf_set_sens) {
err = -1; /* we have not this support for this radio */
goto exit;
}
--
2.34.1
next reply other threads:[~2023-04-09 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-09 13:10 Yogesh Hegde [this message]
2023-04-09 15:12 ` [PATCH] staging: rtl8192e: Fix comparison to NULL of variable rf_set_sens Philipp Hortmann
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=ZDK5UvVHa96ejEfU@Zephyrus-G14 \
--to=yogi.kernel@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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.