From: Tobin C. Harding Date: Tue, 21 Mar 2017 02:37:11 +0000 (+1100) Subject: staging: ks7010: remove zero comparison X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1e765f318824b2f182dedb5e74e05b9f132e07ca;p=openwrt%2Fstaging%2Fblogic.git staging: ks7010: remove zero comparison Comparison, equal to zero, is redundant 'if (foo == 0)' is equal to 'if (!foo)' Typical kernel coding style is to use the shorter form. Remove unnecessary zero comparison. Signed-off-by: Tobin C. Harding Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index d96eed6c8e58..7d4c7f3dd8c5 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -279,7 +279,7 @@ static int ks_wlan_set_essid(struct net_device *dev, /* for SLEEP MODE */ /* Check if we asked for `any' */ - if (dwrq->flags == 0) { + if (!dwrq->flags) { /* Just send an empty SSID list */ memset(priv->reg.ssid.body, 0, sizeof(priv->reg.ssid.body)); priv->reg.ssid.size = 0; @@ -1531,7 +1531,7 @@ static int ks_wlan_get_scan(struct net_device *dev, return -EAGAIN; } - if (priv->aplist.size == 0) { + if (!priv->aplist.size) { /* Client error, no scan results... * The caller need to restart the scan. */