Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3003230pxb; Sun, 29 Aug 2021 10:03:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzu9VNTFH16iLfowt3dNlRtyu9en7PCskhO17WNr0KZlO3RBvXgfMONuyc80sXaJN2CLVja X-Received: by 2002:aa7:d818:: with SMTP id v24mr8325177edq.197.1630256637288; Sun, 29 Aug 2021 10:03:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630256637; cv=none; d=google.com; s=arc-20160816; b=YhimQ+K5SShIRI4U2autxchXB/qcetyA8RFrMWCaKPUD+E30kvXKe3NvZLnIzGCqXN HtB8JVsH/OuS2ngNYXBOM/gifnqyLB/bPKuKgwlTx53g0b3BQ+x75eDL5Bg2azYr3ukd FPERVkhT/QO4xpbUt8iuhZ8t57NO318U+2r7E5B3oTKRQogByOSDYuofKxl4MWuR8UxW GDl6EjTpcIOfR52M+VboUzMRgLXxi23x5GKD3q2dDRMTYS1aXi0OghBbzguBG9CVbQed +VFwHtyS6zDQTrjv9t+TRR2d6KIBvwu83cVf7DvpRbeEQqcl+ZnuO00SBke++1okYRi9 ll8Q== 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=4R4J9rlvTKoWzxXXHOcB/bA1tGLKkMYkfbOBsCAW1c0=; b=DkgPrNMuRWUgVyv76+SjXb6tkh6zsojRKtI+YpcJqLc05+iSW+YhNGVdB5rstaXq/D 5dA4lbOEOBMC+f1/gelWkipyakdXEjmc+qoN8lndtAZ7w/eJB9/e6ef+ySeR8aaFph06 M6qi2GIUe9NmxlwhNzeTF4nmEoxV3QvFKJoono+9R4ogf/57coRwH+nLqhMsT5mZFxF5 DjOlrGyLQxNFQYo3ZG0pT8tgeobZDF7DPfY7rJF05EcVA/4IbfdsP+G6QRpRr4bStW1H TADpooR+NytT7nhXhlnWVE+IWWOJ6EjaRcpX02e6xOvJOlJVpl2posoRIp1NufzlNGdy +HmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="nK0Fz/vW"; 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 bl2si12934581ejb.55.2021.08.29.10.03.18; Sun, 29 Aug 2021 10:03:57 -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="nK0Fz/vW"; 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 S229706AbhH2RBK (ORCPT + 99 others); Sun, 29 Aug 2021 13:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229467AbhH2RBJ (ORCPT ); Sun, 29 Aug 2021 13:01:09 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23AE0C061575 for ; Sun, 29 Aug 2021 10:00:17 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id s29so5445636pfw.5 for ; Sun, 29 Aug 2021 10:00:17 -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=4R4J9rlvTKoWzxXXHOcB/bA1tGLKkMYkfbOBsCAW1c0=; b=nK0Fz/vWMlj+h/f1e/AMVns+P+Nlx0FsYwdUi34OD1gY4QxbF1zXDQ15+7tAwKK3Y9 vE33tZpy7wZmQOxSE+kIsqnH/ZLQdMBUrvyX2YnI9K/OqVEw70vGlw4Y2IcUpDa77K8O n262CJAlO7e9GJbDiW9K9pG2O98mObCXwBb4GGkTh+DD6/Bxe4lKYENKITL9ECbVQLly IRGTkoGwGUaRq7I190MEaVIfU/+btdynTNgaLw6oBn5HVWDM1/5NXB9StrzTcw4EQkfS 93TZByu3LFh7DBx0T+2hiJgVDSm5DtET8XD2yixkA6YgXdkMW5u1PwisSbiWAwPMGA/0 kecw== 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=4R4J9rlvTKoWzxXXHOcB/bA1tGLKkMYkfbOBsCAW1c0=; b=XcQPvI3krzVpXSul02yu8UtMbv+mUARcIc/vlg7J82aPWdeILE0Ar3kbfy9jW8YBEA xeUWOonXYbsHgZtRattGmjabkadn0TLI8nNN78I6AP/2yz4FkcSZmhQcJUKx/AJWMpxV 0Om7GC0l0AXcPhao8uv8KiSjMoZ1EdA/sv1JeudTiBxZUqXROgUpge12/O8sFMwXlyZ2 JCZg0OwktugK95dw5BdikI9ln/zwt9brB/C7QoDvo4acsjB0geqMfZqaCQr6HNnj471t 5+JllU8hjwzgQZWqlaWlauyAPjKiGpL6qXtbvKrsBWg9fuAprZKh3JCILGySe6nU/Xii I95g== X-Gm-Message-State: AOAM533W+DOva6+Va39JRQimOp8NxwDpzDUaEBOFUFo4X4JnpIHUvUWk aEmPJe+7Izv0i/7NGJiLqdU= X-Received: by 2002:a63:2f04:: with SMTP id v4mr17593682pgv.380.1630256416549; Sun, 29 Aug 2021 10:00:16 -0700 (PDT) Received: from user ([117.98.200.228]) by smtp.gmail.com with ESMTPSA id 10sm13062093pgd.12.2021.08.29.10.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Aug 2021 10:00:16 -0700 (PDT) Date: Sun, 29 Aug 2021 22:30:09 +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, saurav.girepunje@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH v4] 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. Correct the indentation. Signed-off-by: Saurav Girepunje --- ChangeLog V4: - Add Change log below --- line ChangeLog V3: - Add change log. ChangeLog V2: - Correct the indentation. drivers/staging/r8188eu/core/rtw_sta_mgt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_sta_mgt.c b/drivers/staging/r8188eu/core/rtw_sta_mgt.c index f6dffed53a60..c3600cb1790a 100644 --- a/drivers/staging/r8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/r8188eu/core/rtw_sta_mgt.c @@ -155,9 +155,8 @@ 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