Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2321284pxb; Sat, 28 Aug 2021 10:58:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy494qy9EO5R3rKVoy3iWnsQ/CX+4RiaSnO1bvcmBHp/0mUchVkZIZG3IXfoR4/CrXb2Gop X-Received: by 2002:a6b:fb03:: with SMTP id h3mr12095708iog.198.1630173535449; Sat, 28 Aug 2021 10:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630173535; cv=none; d=google.com; s=arc-20160816; b=KoCo502UZEiz49G25JUk4SRqf8EU7JwXtwvcrZflhEWIRnIXj9ATcQLvOtWjGUSLnk VKYyhdEIbdKpND5HW3e/H3/DEwJ/rjX+TaF65g9436Es22Is2yffuagoq1PKz37NwPr9 cUBGRYpEtGOpbCI5qumhCmDoUSw6vv9AUPzKar9m+L6mDcfFOFLF94CRoJcSroz304fW 2m8iguinL9vZhHjO7Te4UmpAFvE12jS2v/ypS+ch4DaywdE3RmVlq0/Tz26SD5bAymQ0 JKNhGDJ6ROQPpQut4iJw68qxvsPnxtvWGa2wvbgV/BirvkKieHvXtXmBJC0VXX7/jAHM wKJw== 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:cc:to:from:date:dkim-signature; bh=c1G2etAo7RXizmOfzbwL5cJQFEkKfK8BqKZoS+nPauQ=; b=h+hoBn7yt2NQ9yFTcmU7qqRX5Y5acRfaEc3GyPoRxvE3KHgScZ6WZci20QwEolV3YZ deP/5EyuKPqoA2JhUjN94AdRY4MPSS2rgjOAGnh+8P36fHwI+m1ao9vayANnutMlfv9m Lyguvjjm1NPGSz4Kw77YzlGGEXcQjKpQUU8280TXv4YL34l6ZubC1UXZ7HeijhZx8bve 5WJL0jBTa9WhRUPMQStFSmynmwodizZpmgh/l1BDbFGJILAI3AcRRxEysN50scTXgmdY E7uV60so3zshyCae5DxP+cAJNxITbllmAIIHGJP6kriDjyG+GR1TSDvQKVaXIBS6Lquv 986w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E/R8t3XZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si9383314jak.4.2021.08.28.10.58.44; Sat, 28 Aug 2021 10:58:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E/R8t3XZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229755AbhH1RzW (ORCPT + 99 others); Sat, 28 Aug 2021 13:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhH1RzV (ORCPT ); Sat, 28 Aug 2021 13:55:21 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08A68C061756 for ; Sat, 28 Aug 2021 10:54:31 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id x19so1677401pfu.4 for ; Sat, 28 Aug 2021 10:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=c1G2etAo7RXizmOfzbwL5cJQFEkKfK8BqKZoS+nPauQ=; b=E/R8t3XZI/5mgoy6q/2sninrfivvVRMNytclY5+w2rNZgcmetRzMO1rD8RoOQCvxFF OrpXRzpzT00CEvPGF94Dsxz8bjnl767jjxrchvSvs2GiyfBuS/UExPhBAZWRDtPOjtjF V2EqJ3NUmO1sYOHdHmBOVG/vCostMW+PdvdmxVQVKb3X/aWecNcvWyIt6AV2jYyE6HdS yzj7PhUuCh1j1VxjsYBQWQ18g/rDq4ButH7KGd+CbSBxULRR+Gotgf79qsHlr7Glbrad mdelxgUtaoyZCEIAwOumugPbwTMc6irrmtBOnGNCDYNCnWAXzVcRRTARWaXx5AHs/Gc4 38+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=c1G2etAo7RXizmOfzbwL5cJQFEkKfK8BqKZoS+nPauQ=; b=dwHhzL+n/z1FcC4U+iwAVMxwrys5ejVqSXmfnZJTVYeS/XJnRm8UitXZhQRQbXWhWy VHuCYUuuUkN4D4XrrhRAK0lNSZR8qaNe9oq6br5d7bUbUzyp4KLz4Kh4HluZOci9p7Qo t/Ewnr5bHPH+lPid7u7U3wUojpDGFJnpXAXI5waADMv9Lecyc/fq2JkaEwVKc8elP6/R /lh5mi5X/IEr6gWKs6cTXXPtJykS9usOyWKmiga3uCy8tdFQFTK5g/grWb4Uq0/x+TP1 ie1ww8WOhYrbBv/tpLVgEy8bKaHZdNcHF0Y0p5ecAKKq69Jg2yzZOd52sahksqS/dLAQ awSw== X-Gm-Message-State: AOAM533k0ngM25utO4nQLzf+mMCEZCdw581U9+j4wNtseh1n58y06pC4 rVdYTnktmosTHnyZcy4jcl8= X-Received: by 2002:a65:5a8e:: with SMTP id c14mr13112527pgt.125.1630173270431; Sat, 28 Aug 2021 10:54:30 -0700 (PDT) Received: from user ([117.98.200.228]) by smtp.gmail.com with ESMTPSA id y140sm2294700pfc.139.2021.08.28.10.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Aug 2021 10:54:30 -0700 (PDT) Date: Sat, 28 Aug 2021 23:24:24 +0530 From: Saurav Girepunje To: Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, fabioaiuto83@gmail.com, straube.linux@gmail.com, ross.schm.dev@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: r8188eu: core: remove null check before vfree Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove NULL check. NULL check before freeing function is not needed. Signed-off-by: Saurav Girepunje --- drivers/staging/r8188eu/core/rtw_sta_mgt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index f6dffed53a60..4726771a8403 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -155,9 +155,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv) spin_unlock_bh(&pstapriv->sta_hash_lock); /*===============================*/ - if (pstapriv->pallocated_stainfo_buf) - vfree(pstapriv->pallocated_stainfo_buf); - } + vfree(pstapriv->pallocated_stainfo_buf); return _SUCCESS; } -- 2.32.0