Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2365954pxb; Sat, 28 Aug 2021 12:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJym/JnGlGXHbpJN/29E0Rp2mKZBQCXBbkhTtjrx/Fw+48YJKkKcxcGayMBAYBJ0/kKb/dAl X-Received: by 2002:a6b:b586:: with SMTP id e128mr12448045iof.37.1630178778294; Sat, 28 Aug 2021 12:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630178778; cv=none; d=google.com; s=arc-20160816; b=sKBYIUkd7Z24bm8IN0kzGE1/+E3zdb4GLdDhEAhS4IdugqBFQ99OJ7AsKKqpfByVo6 eg1FP6bhBBPzOcpN/xTV89zOoTdUWhLx0BbfHzcp+cBaSd0YiHBp7s2xKQe4IL15fY4I EFUBq4i0RV7ErI7mMGHAFWvZ7W0S+3RjnhTFLfDn5EvNK0rWt0wSaGI4vNycT8W8+MKk m4CPHyEOwO5UtqF7SrUTKK1Eivx4Osh+5VqxcWE89Ll3OQ4fLO2Wjv7hBKhEFM6NiWkg baH9py3XcJIM9P8Y+gMa3WXhvtXVvZIIBXuqMgpzHO+MmSx4dnZAEFcEBPYhvlvYzZVB LxDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3blXmIdosDOuNNq7nc3EFCtcuawBSD/bJRQmtHW5+7k=; b=ZP6bfzE6eUkx5z0FfMF75yKkU7R/LoBnS1tzBCNBnifz3ds4RJ/xsGHrl25Lt7mQZy llLB18VCKKmmefVPreVM8/ac6vA16YN8kvPgX4TQZw0y06S56oafvvHpdDmZGx1UwM24 nZVAia25JiKbPLKTH+2ZxV/0KaIqNzfPlUREDsRCIOgfw+22h1kzNgGCpOmuzyVg2hWm QEYsjCtxBzyXZSFpxvkpVFo+SibulUMMd79MxtSPxbt0NiG+8f9UMSnfG1/HLCzZ8dRJ TW8dra+ta24urI6MNBDbj63ue30W0pdpEaMjxQUXp9quv7mlrUvOpB7x+kWZYqlAzvdG tTAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="BoUhq/Gf"; 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 d10si10371541ios.58.2021.08.28.12.26.06; Sat, 28 Aug 2021 12:26:18 -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="BoUhq/Gf"; 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 S231140AbhH1TVt (ORCPT + 99 others); Sat, 28 Aug 2021 15:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbhH1TVs (ORCPT ); Sat, 28 Aug 2021 15:21:48 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 941C6C061756 for ; Sat, 28 Aug 2021 12:20:57 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id c129-20020a1c35870000b02902e6b6135279so6669320wma.0 for ; Sat, 28 Aug 2021 12:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=3blXmIdosDOuNNq7nc3EFCtcuawBSD/bJRQmtHW5+7k=; b=BoUhq/GfIAy4h/4PE78IRtrCiIBdQAyXgY6Hkfs+QynhWluSjz7NDD+9Umc0Pr8E8M fHbWxcESZS4Hh8Owb59LUMiZQmODjssSQ6AxMWJ1KdUld7S3t/3/fU8AOG7gOnIrI8NX Rx1xrMjwKfUQTkS/Aw+/7Mx4LkNtmteALToLtPY5No8G+/8xTNsyxWr8nnKLA6HJBJSy jyxW2Na7Ydie2n3BvrB/bHckxzIHV9oKuHT/JGcYhDveRPP6miCnqt44nJIRceFZqIRk 3BfOBEVqu6Y5grr/EgSCJb/NJddRA5sZKIH0mWsV7s/ORtvHHHv6jjf7Kq3EkFQUpRr+ LfPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=3blXmIdosDOuNNq7nc3EFCtcuawBSD/bJRQmtHW5+7k=; b=Omea2CEjfdKzgyYCDvrc9oBAVlALEgrHa6ocIIN0Rsp9NJSB02rUflPgslLxqG5BUG D5z4LcxSN+aIEEvgTgm1Hf5bKJKoyNPE3flZJolHMAESxX8gIid+BNUVHJ4yxt29gfyv JilgslCg0wG1dVLsCCtmFOfgg84ERa99Gby6rqyC6AQ6lufooqaSqJhfRQh4YDdghSXX n3bD3Bu/ctrtFTBUSNVdV2QuetFEHe09xEccfL9LAUlD5rVjbKobblV3ZV7CFji0wRhR PISM8aq0BzAsHLZ1GkEmSTvbigUWYFBDSEjshmjCM9HtwQKlyTO+qWP5c0ousvukR8IT xS6w== X-Gm-Message-State: AOAM531+eBusHNR+P6pwRUH67FvaQXCRm/GJpEs2nk/4Ri+U0sLS0bYM Y2u2IaP/O34C6yiX/gAizN8= X-Received: by 2002:a1c:7dd0:: with SMTP id y199mr15046919wmc.148.1630178456131; Sat, 28 Aug 2021 12:20:56 -0700 (PDT) Received: from ?IPV6:2a02:8108:96c0:3b88::884b? ([2a02:8108:96c0:3b88::884b]) by smtp.gmail.com with UTF8SMTPSA id p13sm10288209wro.8.2021.08.28.12.20.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 28 Aug 2021 12:20:55 -0700 (PDT) Message-ID: <1e31610a-0324-dfb7-abe5-f05d652d461d@gmail.com> Date: Sat, 28 Aug 2021 21:20:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.0.1 Subject: Re: [PATCH] staging: r8188eu: core: remove null check before vfree Content-Language: en-US To: Saurav Girepunje , Larry.Finger@lwfinger.net, phil@philpotter.co.uk, gregkh@linuxfoundation.org, fabioaiuto83@gmail.com, ross.schm.dev@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com References: From: Michael Straube In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/28/21 19:54, Saurav Girepunje wrote: > 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 > Acked-by: Michael Straube Thanks, Michael