Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192e: Fix comparison to NULL of variable rf_set_sens
@ 2023-04-09 13:10 Yogesh Hegde
  2023-04-09 15:12 ` Philipp Hortmann
  0 siblings, 1 reply; 2+ messages in thread
From: Yogesh Hegde @ 2023-04-09 13:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel

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


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

end of thread, other threads:[~2023-04-09 15:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-09 13:10 [PATCH] staging: rtl8192e: Fix comparison to NULL of variable rf_set_sens Yogesh Hegde
2023-04-09 15:12 ` Philipp Hortmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox