Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3027342rwl; Sun, 9 Apr 2023 06:35:38 -0700 (PDT) X-Google-Smtp-Source: AKy350ZLTxROgpmFF7k+IvlGz7rrM0afq+FsunJYjf5GFqEvaUrcBEAiQKYewLfPX3wd9Nv+zXd9 X-Received: by 2002:a17:90b:3a91:b0:237:461c:b31a with SMTP id om17-20020a17090b3a9100b00237461cb31amr9331154pjb.32.1681047337627; Sun, 09 Apr 2023 06:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681047337; cv=none; d=google.com; s=arc-20160816; b=U/6U3wcZT+pHP8PC5bLhhMfZbEhJgc/S2O1XFqKVsTQ+kL7ERYiw2N5lAY9bqYzy1Q rF2M/LXoIXmRYWiwY9kJe0Ymyb3Z5zOUIdNdMuoO1zMKjZF7cCOOFm1OuuD9P1tCwS1/ 3h5iUSx0A9Hkg7LCNyTMCkdDpP8W5ZrLEOoJgosH0xfe8JsOkw7VR8fMF8txF+9ViCPI mIgcFvIvdJf/sVS3Iduudj5+xz/gFVB16jgSgNZh1XFpWG7HorkMUS6az/92e+CyitE/ 0SQjOhdqE7ahD/xkBLZ/n5fX5Gjl97wXOkU0ZPOuGjdn0aC4nhhNCva74OqDP+XC1gp2 b4cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=4fXaACdefbFVmBrFv928AIoW85GWTWRcXqxLif4tfE4=; b=1CYQTiTY68C85mpwr9TyirU2BJK2T75NrlwYBWyKYre0zHzJvhmc1mq+sN8qVYDBC1 9+fzuHkNlBsaqrBKUML7TahQGcmJ3+9Lv6/hmvh9n3B7eaS+fJx7ftfTfOMdlIur+CZ2 g7f4ngXEmesDz25vduN/xjRHR0X8pStm17s/tAaZdCJe2utjKtSUdkUJT/EIN3RMI3Dv lRwskTzV3/PVkAWaL5oZmoAYx4pGdQ+/IZKQQbHkxJWh3Ps++PVdnd3N+WXR9PjF5ofo w8x3je6ZPN3/R24AUsPaOCCSAGJ5M73oryL/jkw9YqVbC6J23fusMTTD5aoOg47/sx69 1uiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kypOjEp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n16-20020a17090aab9000b0023def94be71si10844401pjq.162.2023.04.09.06.35.25; Sun, 09 Apr 2023 06:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kypOjEp3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229548AbjDINKs (ORCPT + 99 others); Sun, 9 Apr 2023 09:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDINKs (ORCPT ); Sun, 9 Apr 2023 09:10:48 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D66D40DE for ; Sun, 9 Apr 2023 06:10:46 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id d22-20020a17090a111600b0023d1b009f52so4976685pja.2 for ; Sun, 09 Apr 2023 06:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681045846; x=1683637846; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=4fXaACdefbFVmBrFv928AIoW85GWTWRcXqxLif4tfE4=; b=kypOjEp3OjhhaD6eQjroTPNErS71sIcg4B7CgLJE4CbJ72YHcRWmQ/YHjx7gWvPypV hPAD35ILDpdbLWwJGFQYnCWJbV0ii8O5C0T75WVgRgtJ2Frf9dHM+hdSuRYL0yRSm7tr ApW65cEkPLjZ3AmcUe44Z/ofjtp+Gp4Y/1QcWHmIIKDj9ssbA0+LvXu4rXLibf2eW3E6 RpLQTHuqczhTOznO+iVpRTKJGTgKidKyMD+5RIWVaX8KoEewwf9YaLlG11C6oUA8cqFU IT0qhY0o0fAmWmU1Bd1TtQJ17kUu8Y97Z04NPfS8AqzbCXb5PRHS6pH81QpX/3jTsT1W 0omA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681045846; x=1683637846; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4fXaACdefbFVmBrFv928AIoW85GWTWRcXqxLif4tfE4=; b=qiYw/5bS6mkuOmap3/Udgvcro0WCdYoAT5mAI/QpH/Ao+Pv+6pPiBcUhqUHIIY2E3H 1AThurHSJL+NU/q52Z0UhdhXZnrWP6FCpaoR94DtFzUTIcFaXsu0juT3h+3O8cx/XCG3 jVk4RiXBDA5yQV0d8gR32sEgN+u8qGCiQxY9G0gRsC8OPpPAXv08oiEIO4VqOqIaRJaW 9qcfWZII3Fcm/Dat7yNSvn+izUmB4YW+Ov9YIH8OC3EFHzVflGJWRPvt3nldhU+2Qefa DWxxDuOW5jBIcQ5nVCdkfYQ0XXIY4KvVZgFPX0H132o9IVzsdn3k9D25rdn5Zl5NSNiG HpLg== X-Gm-Message-State: AAQBX9f4Bug0zYCg9YI3RUeB96oj207d9/+ckWf68vbOE0VzyuV2SB5m HFjqHSP/NOzSTxk3jErPNMV/Cuqe4TE= X-Received: by 2002:a17:90b:164b:b0:237:f018:6433 with SMTP id il11-20020a17090b164b00b00237f0186433mr9924203pjb.27.1681045846058; Sun, 09 Apr 2023 06:10:46 -0700 (PDT) Received: from Zephyrus-G14 ([103.251.210.208]) by smtp.gmail.com with ESMTPSA id jg14-20020a17090326ce00b001a1fe42a141sm5898218plb.115.2023.04.09.06.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Apr 2023 06:10:45 -0700 (PDT) Date: Sun, 9 Apr 2023 18:40:42 +0530 From: Yogesh Hegde To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rtl8192e: Fix comparison to NULL of variable rf_set_sens Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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