Commit d6628e8c authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: clean up comparsions to NULL



Clean up comparsions to NULL reported by checkpatch.
if (x == NULL) -> if (!x)
if (x != NULL) -> if (x)

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200919150823.16923-3-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7a9c7b5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
	/* range->old_num_channels; */
	/* range->old_num_frequency; */
	/* range->old_freq[6]; */ /* Filler to keep "version" at the same offset */
	if (priv->rf_set_sens != NULL)
	if (priv->rf_set_sens)
		range->sensitivity = priv->max_sens;	/* signal level threshold range */

	range->max_qual.qual = 100;
@@ -666,7 +666,7 @@ static int r8192_wx_get_sens(struct net_device *dev,
{
	struct r8192_priv *priv = ieee80211_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;
@@ -680,7 +680,7 @@ static int r8192_wx_set_sens(struct net_device *dev,
	short err = 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 −2
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ static void cmpk_handle_tx_rate_history(struct net_device *dev, u8 *pmsg)

	ptxrate = (cmpk_tx_rahis_t *)pmsg;

	if (ptxrate == NULL)
	if (!ptxrate)
		return;

	for (i = 0; i < 16; i++) {
@@ -479,7 +479,7 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
	/* 0. Check inpt arguments. It is a command queue message or
	 * pointer is null.
	 */
	if (pstats == NULL)
	if (!pstats)
		return 0;	/* This is not a command packet. */

	/* 1. Read received command packet message length from RFD. */
+1 −1
Original line number Diff line number Diff line
@@ -1150,7 +1150,7 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(struct sw_chnl_cmd *CmdTable, u32 CmdTab
{
	struct sw_chnl_cmd *pCmd;

	if (CmdTable == NULL) {
	if (!CmdTable) {
		RT_TRACE(COMP_ERR, "%s(): CmdTable cannot be NULL\n", __func__);
		return false;
	}